unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Skyler via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 62448@debbugs.gnu.org
Subject: bug#62448: Inconsistent guile enviornment from guix shell
Date: Sat, 25 Mar 2023 19:10:04 +0000	[thread overview]
Message-ID: <hi_7jAEECmnA-PPNliCmldWGrYqR-HqkSIJ7_oLR4vSHRIVI_JH4Zt_lKOb8953YbOANvw1BwdZTL2FxpQfeA8pwIQny5hTZVL9xlGO36Gw=@protonmail.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 5464 bytes --]

Hello,

The modules available in a guile REPL seem to be inconsistent after running the guix shell command, where using the -D flag to create a development environment behaves as expected, but leaving out that flag to add the package itself to the environment does not. I am experiencing this issue with some random code on my machine, but I will use guile-pubstrate defined in guix code (https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/guile-xyz.scm?id=04724e59971b03f86a410285653d24005c62b924#n340) as an example for reproduction. Note that guile-pubstrate lists guile-webutils as a propagated input.

When I use `guix shell -D guile-pubstrate`, I am able to import the `(webutils bytevectors)` module, as I would expect. I am not able to import `(pubstrate apclient)`, also as I would expect. Inspecting GUILE_LOAD_PATH shows that a new profile path was added which contains the dependencies:

$ guix shell -D guile-pubstrate --checkguix shell: checking the environment variables visible from shell '/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/bash'...
guix shell: All is good!  The shell gets correct environment variables.
[env]$ guile
GNU Guile 3.0.7
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (webutils bytevectors))
scheme@(guile-user)> (use-modules (pubstrate apclient))
While compiling expression:
no code for module (pubstrate apclient)
scheme@(guile-user)> ,q
[env]$ echo $GUILE_LOAD_PATH
/gnu/store/pr4vyrz2xsziv25hrdfyim0wy331p4z5-profile/share/guile/site/3.0:/run/current-system/profile/share/guile/site/3.0:/home/skyler/.guix-profile/share/guile/site/3.0
$ ls /gnu/store/pr4vyrz2xsziv25hrdfyim0wy331p4z5-profile/share/guile/site/3.0
8sync      apicheck.scm  config     debugging  fibers      gcrypt    gnutls      graph         io       match-bind.scm  md5.scm  rx      search  sjson.scm  term     text           web
8sync.scm  compat        container  fash.scm   fibers.scm  gdbm.scm  gnutls.scm  htmlprag.scm  logging  math            os       scheme  sjson   string     texinfo  unit-test.scm  webutils

However, when I use guix shell guile-pubstrate, neither (webutils bytevectors) nor (pubstrate apclient) are available. I would expect both of them to be, the former because it is a propagated input and the latter because it is the package that was directly added. If guile was able to locate pubstrate's modules, I would expect loading to fail because its runtime dependencies are not available. Inspecting GUILE_LOAD_PATH shows that nothing was added to it:

$ guix shell guile-pubstrate --check
guix shell: checking the environment variables visible from shell '/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/bash'...
guix shell: All is good!  The shell gets correct environment variables.
[env]$ guile
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (webutils bytevectors))
While compiling expression:
no code for module (webutils bytevectors)
scheme@(guile-user)> (use-modules (pubstrate apclient))
While compiling expression:
no code for module (pubstrate apclient)
scheme@(guile-user)> ,q
[env]$ echo $GUILE_LOAD_PATH
/run/current-system/profile/share/guile/site/3.0:/home/skyler/.guix-profile/share/guile/site/3.0


This is not an issue with the guile-pubstrate definition in particular, because guix shell guile-webutils also fails to add its modules to my environment:


$ guix shell --check guile-webutilsThe following derivation will be built:
  /gnu/store/ca8gv3yk2khs0h60kc5v682g7gvfqd23-profile.drv

building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 1 package...
guix shell: checking the environment variables visible from shell '/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/bash'...
guix shell: All is good!  The shell gets correct environment variables.
[env]$ guile
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (webutils bytevectors))
While compiling expression:
no code for module (webutils bytevectors)

My machine is up-to-date as of today:

Generation 32 Mar 25 2023 11:32:38 (current)  guix 04724e5
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 04724e59971b03f86a410285653d24005c62b924
  rde a7b5944
    repository URL: https://git.sr.ht/~abcdw/rde
    branch: master
    commit: a7b59443405169600a00f0b295a3fb1de360cb0b


Let me know if there is anything I can do to help diagnose or fix this issue.


Thanks,
Skyler

[-- Attachment #1.1.2.1: Type: text/html, Size: 13650 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

             reply	other threads:[~2023-03-25 19:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 19:10 Skyler via Bug reports for GNU Guix [this message]
2023-03-29 21:23 ` bug#62448: Inconsistent guile enviornment from guix shell Skyler via Bug reports for GNU Guix
2023-03-30 20:24   ` Josselin Poiret via Bug reports for GNU Guix
2023-03-30 20:42     ` bug#62448: [PATCH] doc: Note that `guix shell` should contain base language packages Josselin Poiret via Bug reports for GNU Guix
2023-04-11 22:57       ` Skyler via Bug reports for GNU Guix
2023-04-12  8:35         ` Josselin Poiret via Bug reports for GNU Guix
2023-04-12 12:43         ` Maxim Cournoyer
2023-04-13 19:53           ` Skyler via Bug reports for GNU Guix
2023-04-12 11:07       ` Simon Tournier
2023-08-25 16:30         ` Josselin Poiret via Bug reports for GNU Guix

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='hi_7jAEECmnA-PPNliCmldWGrYqR-HqkSIJ7_oLR4vSHRIVI_JH4Zt_lKOb8953YbOANvw1BwdZTL2FxpQfeA8pwIQny5hTZVL9xlGO36Gw=@protonmail.com' \
    --to=bug-guix@gnu.org \
    --cc=62448@debbugs.gnu.org \
    --cc=skyvine@protonmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).