unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64856: guix shell cache doesn't consider grafts
@ 2023-07-25 13:55 Maxim Cournoyer
  2023-10-12 16:57 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2023-07-25 13:55 UTC (permalink / raw)
  To: 64856

Hello,

While investigating https://issues.guix.gnu.org/64836, I discovered that
the cache of 'guix shell' doesn't take into account grafts for
subsequent invocations.

Consider, using Guix at commit 21b718f4d6c3ded8ef50d12f6e9ae6474f74620f:

--8<---------------cut here---------------start------------->8---
$ guix build gtk+
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37

$ guix build --no-grafts gtk+
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37

$ guix shell gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

$ guix shell --no-grafts gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32
--8<---------------cut here---------------end--------------->8---

The 'guix shell --no-grafts' invocation simply reused the same cache as
the previous command, so grafts are in use, which is non-intuitive.  The
reverse would be true as well:

--8<---------------cut here---------------start------------->8---
$ guix shell --rebuild-cache --no-grafts gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

$ guix shell gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32
--8<---------------cut here---------------end--------------->8---

The ungrafted cache got reused by the invocation that should have used
grafted inputs.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#64856: guix shell cache doesn't consider grafts
  2023-07-25 13:55 bug#64856: guix shell cache doesn't consider grafts Maxim Cournoyer
@ 2023-10-12 16:57 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2023-10-12 16:57 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 64856-done

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> While investigating https://issues.guix.gnu.org/64836, I discovered that
> the cache of 'guix shell' doesn't take into account grafts for
> subsequent invocations.

Fixed in 75bdf8e06a325b90bf387a03f88726d338acbbf6.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-12 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 13:55 bug#64856: guix shell cache doesn't consider grafts Maxim Cournoyer
2023-10-12 16:57 ` Ludovic Courtès

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