GNU bug report logs - #71979
(file-name->module-name (location-file (package-location pkg))) returns wrong module

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sun, 7 Jul 2024 16:17:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: 71979 <at> debbugs.gnu.org
Subject: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module
Date: Sun, 7 Jul 2024 18:16:10 +0200
[Message part 1 (text/plain, inline)]
Hi,

when I try to use the above, it returns wrong module.  The module returned is
prefixed by #{.}# symbol.  Full reproducer:

    (define-module (xx)
      #:use-module (guix)
      #:use-module (guix modules)
      #:use-module (guix utils))

    (define-public pkg
      (package
        (name "foo")
        (version #f)
        (source #f)
        (build-system #f)
        (synopsis #f)
        (description #f)
        (license #f)
        (home-page #f)))

    (pk (file-name->module-name (location-file (package-location pkg))))

Now just run it:

    $ GUILE_AUTO_COMPILE=0 guile -L . -c '(use-modules (xx))'

    ;;; ((#{.}# xx))

Notice that the module is not just (xx) as it should have been.

The impact of this bug is broken guix pull for my channel (I will work around it
somehow, I hope) but still it would be nice if it worked properly, hence this report.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.