bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71979: (file-name->module-name (location-file (package-location pkg)


From: Ludovic Courtès
Subject: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module
Date: Thu, 18 Jul 2024 17:34:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Tomas,

Tomas Volf <~@wolfsden.cz> skribis:

> 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.

Oh, good catch.

I went ahead and pushed a fix as
e3dfed59d39ac60dd2e2b9ef9f4ef63a2a081f41.  Let me know if you find
anything wrong!

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]