guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add (guix scripts).


From: Ludovic Courtès
Subject: Re: [PATCH] Add (guix scripts).
Date: Mon, 14 Sep 2015 15:34:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alex Kost <address@hidden> skribis:

> Ludovic Courtès (2015-09-08 23:10 +0300) wrote:
>
>> Alex Kost <address@hidden> skribis:
>>
>>> We have some code in (guix scripts …) that is rather common (I mean not
>>> specific to the current module), but there is no better place for it,
>>> usually because it uses (guix ui).
>>>
>>> So what about making (guix scripts) module for such general stuff?
>>> I think we can move there ‘maybe-build’, ‘%standard-build-options’,
>>> ‘set-build-options-from-command-line(*)’, ‘show-build-options-help’,
>>> perhaps exported procedures from (guix scripts package).  And
>>> ‘build-package’ may also go there, WDYT?
>>>
>>> Or maybe just put those things into (guix ui)?
>>
>> (guix ui) has become fat; (guix scripts) sounds like a good idea.  Then
>> things like ‘args-fold*’, ‘parse-command-line’, ‘run-guix-command’,
>> ‘run-guix’, ‘guix-main’, and ‘program-name’ should probably move there
>> as well (unless I’m overlooking something that would prevent this),
>> along with ‘maybe-build’ and ‘build-package’.
>>
>> How does that sound?
>
> I like it.  I hope I missed nothing in this patch (it appeared to be a
> big change).  At least "make check" was passed successfully.
>
> I think ‘maybe-build’ may move later when ‘build-package’
> will be added, ok?

Yes.

> Some notes:
>
> - ‘program-name’ is used by ‘define-diagnostic’ macro, so I left it in
>   (guix ui).
>
> - ‘guix-main’ uses ‘initialize-guix’, so I exported it from (guix ui) or
>   should it be moved to (guix scripts) instead and export
>   ‘%gettext-domain’?
>
> - I studied the commit log related to guix/ui.scm, and adjusted the
>   copyright lines accordingly.
>
> Also our 'guix' executable will be changed, I'm not sure what
> consequences it will lead to.

I knew I’d overlook something: That’s a showstopper.  Basically, ‘guix
pull’ assumes that ‘guix’ is immutable.  Maybe we can break it once
before 1.0, but in the meantime, I’d rather avoid it.

That means ‘guix-main’ must remain in (guix ui).  Consequently, a bunch
of other procedures (show-*, run-guix-command, commands) should remain
there, to avoid a circular dependency between (guix scripts) and (guix
ui).

WDYT?  Could you try to adjust the patch accordingly?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]