GNU bug report logs -
#76698
Activations interfere with each other modules
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Mon, 3 Mar 2025 01:03:02 UTC
Severity: normal
Merged with 77365
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello,
>
> Hilton Chain <hako <at> ultrarare.space> skribis:
>
>> Activation scripts are already ‘program-file’s, but unfortunately
>> (gnu build activation) and (guix build utils) are implicit dependencies. This
>> is hard to change at the moment.
>>
>> I have sent a patch which might partially address your issue:
>>
>> [PATCH v2 3/3] services: activation: Continue on exceptions.
>> https://issues.guix.gnu.org/73494#26
>>
>> It executes activation scripts by ‘invoke’, so they won't change the
>> environment.
>
> Activation snippets all run in the same Guile process so far, mostly out
> of a concern to be more efficient than running each one in a separate
> process as you suggest.
>
> The downside is what Tomas found out: the load path is global to the
> entire set of activation snippets.
>
> Now, maybe we could have the best of both worlds: instead of
> ‘activation-script’ doing
>
> (for-each primitive-load '#$actions)
>
> it could do something like:
>
> (for-each (lambda (action)
> (guard … ;like Hilton suggests
> (save-module-excursion
> (lambda ()
> (set-current-module (resolve-module '(guile-user)))
> (primitive-load action)))))
> '#$actions)
>
> Thoughts?
+1 for the approach, for implementation I think you need
(make-fresh-user-module) instead of (resolve-module '(guile-user)).
>
> Ludo’.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.