* bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ
@ 2019-02-20 10:38 Daniel Gerber
2019-03-06 13:38 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Gerber @ 2019-02-20 10:38 UTC (permalink / raw)
To: 34590
Hi,
From reading the doc on `guix environment`:
-L, --load-path=DIR prepend DIR to the package module search
path
I would expect these to be exactly equivalent:
$ export GUIX_PACKAGE_PATH=; guix environment -L path ...
$ export GUIX_PACKAGE_PATH=path; guix environment ...
Yet they differ. With libuv@1.24.0 in the guix channel (a37bdf4)
and libuv@1.26.0 in --and also node@11.10.0 only in--
/gnu/guix-local-packages/:
$ export GUIX_PACKAGE_PATH=/gnu/guix-local-packages/; guix
environment --no-grafts -C node@11.10.0 --ad-hoc strace gdb -- ls
/gnu/store/ |grep -o libuv-.*
libuv-1.26.0
$ export GUIX_PACKAGE_PATH=; guix environment -L
/gnu/guix-local-packages/ --no-grafts -C node@11.10.0 --ad-hoc
strace gdb -- ls /gnu/store/ |grep -o libuv-.*
libuv-1.24.0
Is this the intended behaviour?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ
2019-02-20 10:38 bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ Daniel Gerber
@ 2019-03-06 13:38 ` Ludovic Courtès
2019-03-06 14:43 ` Daniel Gerber
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-03-06 13:38 UTC (permalink / raw)
To: Daniel Gerber; +Cc: 34590
Hi Daniel,
Daniel Gerber <dg@atufi.org> skribis:
> From reading the doc on `guix environment`:
>
> -L, --load-path=DIR prepend DIR to the package module search path
>
> I would expect these to be exactly equivalent:
>
> $ export GUIX_PACKAGE_PATH=; guix environment -L path ...
> $ export GUIX_PACKAGE_PATH=path; guix environment ...
>
> Yet they differ. With libuv@1.24.0 in the guix channel (a37bdf4) and libuv@1.26.0 in --and also node@11.10.0 only in--
> /gnu/guix-local-packages/:
>
> $ export GUIX_PACKAGE_PATH=/gnu/guix-local-packages/; guix environment
> --no-grafts -C node@11.10.0 --ad-hoc strace gdb -- ls /gnu/store/
> |grep -o libuv-.*
> libuv-1.26.0
>
> $ export GUIX_PACKAGE_PATH=; guix environment -L
> /gnu/guix-local-packages/ --no-grafts -C node@11.10.0 --ad-hoc strace
> gdb -- ls /gnu/store/ |grep -o libuv-.*
> libuv-1.24.0
>
> Is this the intended behaviour?
Probably not.
I experimented a bit and couldn’t find any evidence that the search path
order would differ.
However, what do /gnu/guix-local-packages/ contain? I suppose it
provides node@11.10.0?
Then my guess is that “node@11.10.0” is ambiguous and that
‘specification->package’ chooses one of the two in a non-deterministic
fashion.
Can you show the output of:
guix package -A node
guix package -A node -L /gnu/guix-local-packages
GUIX_PACKAGE_PATH=/gnu/guix-local-packages guix package -A node
?
TIA,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ
2019-03-06 13:38 ` Ludovic Courtès
@ 2019-03-06 14:43 ` Daniel Gerber
2019-03-06 17:49 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Gerber @ 2019-03-06 14:43 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34590
Hi, 2019-03-06, Ludovic Courtès:
> However, what do /gnu/guix-local-packages/ contain? I suppose
> it provides node@11.10.0?
Yes, it provides node@11.10.0 *plus* its dependency libuv@1.26.0.
$ tree /gnu/guix-local-packages/ /gnu/guix-local-packages/ ├──
gnu │ └── packages │ ├── libevent.scm │ └──
node.scm └── node-llhttp.patch
> Then my guess is that “node@11.10.0” is ambiguous and that
> ‘specification->package’ chooses one of the two in a
> non-deterministic fashion.
>
> Can you show the output of:
>
> guix package -A node guix package -A node -L
> /gnu/guix-local-packages
> GUIX_PACKAGE_PATH=/gnu/guix-local-packages guix package -A
> node
$ guix package -A '^(node|libuv)' libuv 1.24.0 out
gnu/packages/libevent.scm:125:2 libuv 1.19.2 out
gnu/packages/libevent.scm:159:2 node 9.11.1 out
gnu/packages/node.scm:46:2 node-lts 8.12.0 out
gnu/packages/node.scm:202:2
$ guix package -A '^(node|libuv)' -L /gnu/guix-local-packages
;;; note: source file
/gnu/guix-local-packages/gnu/packages/libevent.scm ;;;
newer than compiled
/gnu/store/l6wkk4kzhvkg014slv3plx513cgxqx6h-guix-module-union/lib/guile/2.2/site-ccache/gnu/packages/libevent.go
;;; note: source file
/gnu/guix-local-packages/gnu/packages/node.scm ;;; newer
than compiled
/gnu/store/l6wkk4kzhvkg014slv3plx513cgxqx6h-guix-module-union/lib/guile/2.2/site-ccache/gnu/packages/node.go
libuv 1.19.2 out
/gnu/guix-local-packages/gnu/packages/libevent.scm:159:2 libuv
1.26.0 out
/gnu/guix-local-packages/gnu/packages/libevent.scm:125:2 node
11.10.0 out
/gnu/guix-local-packages/gnu/packages/node.scm:46:2 node-lts
8.12.0 out
/gnu/guix-local-packages/gnu/packages/node.scm:185:2
$ GUIX_PACKAGE_PATH=/gnu/guix-local-packages guix package -A
'^(node|libuv)' ;;; note: source file
/gnu/guix-local-packages/gnu/packages/libevent.scm ;;;
newer than compiled
/gnu/store/l6wkk4kzhvkg014slv3plx513cgxqx6h-guix-module-union/lib/guile/2.2/site-ccache/gnu/packages/libevent.go
;;; note: source file
/gnu/guix-local-packages/gnu/packages/node.scm ;;; newer
than compiled
/gnu/store/l6wkk4kzhvkg014slv3plx513cgxqx6h-guix-module-union/lib/guile/2.2/site-ccache/gnu/packages/node.go
libuv 1.26.0 out
/gnu/guix-local-packages/gnu/packages/libevent.scm:125:2 libuv
1.19.2 out
/gnu/guix-local-packages/gnu/packages/libevent.scm:159:2 node
11.10.0 out
/gnu/guix-local-packages/gnu/packages/node.scm:46:2 node-lts
8.12.0 out
/gnu/guix-local-packages/gnu/packages/node.scm:185:2
I note the order of libuv packages varies, but versions are
correct. Also, should one worry about the "source newer than
compiled" messages? I presumed the cached .go files come from the
official channel, hence older than the sources in
/gnu/guix-local-packages.
--
Daniel Gerber
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ
2019-03-06 14:43 ` Daniel Gerber
@ 2019-03-06 17:49 ` Ludovic Courtès
2019-03-07 8:01 ` Daniel Gerber
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-03-06 17:49 UTC (permalink / raw)
To: Daniel Gerber; +Cc: 34590
Hi,
Daniel Gerber <dg@atufi.org> skribis:
>> However, what do /gnu/guix-local-packages/ contain? I suppose it
>> provides node@11.10.0?
>
> Yes, it provides node@11.10.0 *plus* its dependency libuv@1.26.0.
>
> $ tree /gnu/guix-local-packages/ /gnu/guix-local-packages/ ├── gnu
> │ └── packages │ ├── libevent.scm │ └── node.scm └──
> node-llhttp.patch
(Looks like your email client automatically splits lines, but I think I
got the above tree right.)
Your local packages use the same module names as those in Guix itself:
(gnu packages …).
You should not do that because modules are unique. That is, there can
be only one (gnu packages node) module at run time.
It may be that GUIX_PACKAGE_PATH and -L lead to a different (gnu
packages node) being loaded first, but really the core of the problem
IMO is the module name collision.
So my suggestion would be to rename your modules to, say, (daniel
packages …); remember to “mv gnu daniel” as well.
Let me know if that solves the problem!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ
2019-03-06 17:49 ` Ludovic Courtès
@ 2019-03-07 8:01 ` Daniel Gerber
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Gerber @ 2019-03-07 8:01 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34590
I see, then I'll need another workflow to hack on gnu packages --
either rename them or maintain a local branch/channel for guix and
build with ./pre-inst-env.
That should solve it, thanks!
--
Daniel Gerber
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-07 8:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 10:38 bug#34590: Effects of GUIX_PACKAGE_PATH and --load-path differ Daniel Gerber
2019-03-06 13:38 ` Ludovic Courtès
2019-03-06 14:43 ` Daniel Gerber
2019-03-06 17:49 ` Ludovic Courtès
2019-03-07 8:01 ` Daniel Gerber
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.