GNU bug report logs - #75879
with-parameters does not work generally for packages

Previous Next

Package: guix;

Reported by: David Elsing <david.elsing <at> posteo.net>

Date: Sun, 26 Jan 2025 21:12:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 75879 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: David Elsing <david.elsing <at> posteo.net>
Cc: dev <at> jpoiret.xyz, zimon.toutoune <at> gmail.com, othacehe <at> gnu.org, me <at> tobias.gr,
 guix <at> cbaines.net, 75879 <at> debbugs.gnu.org
Subject: Re: bug#75879: with-parameters does not work generally for packages
Date: Sat, 22 Feb 2025 16:11:18 +0100
Hi David,

David Elsing <david.elsing <at> posteo.net> skribis:

> Oh that's true, this is an additional problem. Would it make sense to
> add the parameters passed to `with-parameters' to the keys used in
> `mcached'? Then the parameters would have to be passed around quite a
> bit however...
> Alternatively, would it be possible to query the fluids with
> `current-dynamic-state' instead and use that for the keys in `mcached'?
> I don't see any way to inspect a dynamic state though.

Problem is that the key must remain “small” so that computing its hash
is fast.  It cannot grow further than its current size, I’m afraid.

Ideally the key would contain only parameters known to be influential,
but we cannot tell which are influential and which are not among those
in the current dynamic state.

> I think `with-parameters' only works for `%current-system' and
> `%current-target-system', not for `%graft?': When setting `%graft?' to
> #f in the second `with-parameters' wrapping in
> `graft-derivation/shallow', it still evaluates to the same derivation as
> with `%graft?' set to #t.

The patch I just sent¹ fixes this issue.

The solution was to do the same as ‘mparameterize’ to ensure that the
extent during which parameters are set is the correct one given this is
in a monadic context.

Let me know what you think!

Thanks,
Ludo’.

¹ “gexp: ‘with-parameters’ properly handles ‘%graft?’.”
  I cannot see it yet in Debbugs.




This bug report was last modified 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.