all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 71979@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	[thread overview]
Message-ID: <Zoq_SpbfnQSd4S-1@ws> (raw)

[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2024-07-07 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-07 16:16 Tomas Volf [this message]
2024-07-18 15:34 ` bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module Ludovic Courtès
2024-07-18 21:21   ` Tomas Volf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zoq_SpbfnQSd4S-1@ws \
    --to=~@wolfsden.cz \
    --cc=71979@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.