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


View this message in rfc822 format

From: David Elsing <david.elsing <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
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: bug#75879: with-parameters does not work generally for packages
Date: Tue, 25 Feb 2025 23:05:20 +0000
Hi Ludo',

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

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

What if the hash is calculated in `compile-parameterized' instead (as
that is the only supported way to set the parameters) and passed to
`lower-object'?

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

Yes that's true, I think the parameters affecting the key should only be
the ones passed to `with-parameters', other parameters would then be
assumed to be constant.

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

I think that's a good idea, but I'm not so convinced it makes sense for
a general monad [1]. An alternative solution [2] using `with-fluids*'
has a different problem however, as it doesn't seem to be compatible
with prompts.

Thanks,
David

[1] https://issues.guix.gnu.org/76485#2
[2] https://issues.guix.gnu.org/76485#3




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.