Hi Ludo’,
Ludovic Courtès <[email protected]> writes:
Hi Ian,
Ian Eure <[email protected]> skribis:
While doing some testing, I noticed a problem, which is that
the
chanenls field of guix-configuration has a default of #f,
instead of
%default-channels; so the extension mechanism ends up adding
channels,
but the defaults are no longer used. I could change the
extension
mechanism to use (or (guix-configuration-channels config)
%default-channels), but I feel like there’s probably a reason
why
%default-channels isn’t the default field value. I don’t want
to push
code that changes this without having a good understanding of
why it’s
the way it is now.
I believe the reason why ‘channels’ defaults to #f is to not
create
/etc/guix/channels.scm at all by default. That way, the default
of the
‘guix’ command that is used prevail.
For your extension mechanism, if an extension adds a channel and
‘channels’ is #f, I would consider it equivalent to
#~%default-channels.
What’s the purpose of wrapping them in a gexp? It looks like
%default-channels is a static value, and using a gexp means a unit
test can’t[1] inspect what’s wrapping it to make sure the default
channel is present.
-- Ian
[1]: It probably can, but I don’t know how to eval a gexp.