Subject: Re: bug#58250: guix import json: GUIX_PACKAGE_PATH -- no code for module

From: Ludovic Courtès <[email-masked]>
Date: Fri, 23 Dec 2022 14:49:40 +0100

Hi,

itd <[email-masked]> skribis:

> * guix/modules.scm (file-name->module-name): Ignore load path prefix
> when building module name.
> ---
> It was mentioned on IRC, that (guix modules)'s file-name->module-name
> might be function to be used by the JSON importer (and fixed if needed).
> This patch attempts to implement the idea from the bug report.

At first sight I believe the fix should be in ‘package->code’, not in
(guix modules).

(guix modules) is quite sensitive so in general we should refrain from
changing the semantics of its procedures.  In this case,
‘file-name->module-name’ expects a file name relative to a search path
entry.

HTH,
Ludo’.