guix-devel
[Top][All Lists]
Advanced

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

Re: Recommend order for package fields?


From: Ludovic Courtès
Subject: Re: Recommend order for package fields?
Date: Wed, 17 Nov 2021 12:18:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> On Sun, 07 Nov 2021 at 13:40, Tobias Geerinckx-Rice via Guix-patches via 
> <guix-patches@gnu.org> wrote:
>
>> So the de-facto ordering of common fields is something like:
>>
>> name
>> version
>> source
>> build-system
>> outputs ; a bit inconsistent, yes, and sometimes put after *inputs
>> arguments ; to the build-system
>> native-inputs, inputs, propagated-inputs
>> metadata: synopsis, description, home-page, properties, license…
>>
>> There's some minor variation in where to put inputs, but 
>> (build-system trivial-build-system) definitely belongs here, above 
>> arguments, no matter what.
>
> Does it make sense to add this ordering advice in the manual?  Somewhere
> under section “Contributing”.

I don’t think so; examples in the manual, ‘guix import’, etc. are
already mostly consistent.

> Especially when there is probably some issues with the semantic, for
> instance, compare [1] corner cases:

It’s not a corner case, it’s lexical scoping.  :-)

> If yes, why not add a checker for “guix lint” for warning that?  And
> obviously, it could be nice to have an automatic tool for formatting;
> something similar as etc/indent-code.el for ordering packages. ;-)

I think ‘guix style’ should eventually be improved to replace
etc/indent-code.el.  We could augment it with specific stylers, such as
alphabetically sorting inputs.

Thanks,
Ludo’.



reply via email to

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