From: zimoun <zimon.toutoune@gmail.com>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Convention for new “guix style“?
Date: Wed, 22 Dec 2021 22:56:28 +0100 [thread overview]
Message-ID: <CAJ3okZ2fXB-pVFJib0-7b1S0ZYLxNxT5=h2W2oGOuO-U=SUf=g@mail.gmail.com> (raw)
In-Reply-To: <23734860fbd9ee8f96b6878aadde0b2a5fe74b69.camel@gmail.com>
Hi,
On Wed, 22 Dec 2021 at 22:18, Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
> Am Mittwoch, dem 22.12.2021 um 14:05 +0100 schrieb zimoun:
> > --8<---------------cut here---------------start------------->8---
> > `(("libx11" ,libx11)
> > ("libiberty" ,libiberty) ;needed for objdump
> > ("zlib" ,zlib))) ;also needed for objdump support
> > --8<---------------cut here---------------end--------------->8---
> >
> > Other said, this looks better:
> >
> > --8<---------------cut here---------------start------------->8---
> > (inputs
> > (list libx11
> > libiberty ;needed for objdump support
> > zlib)) ;also needed for objdump support
> > --8<---------------cut here---------------end--------------->8---
[...]
> For me personally, this illustrates two things. First, the weakness of
> line comments over preceding line comments ad second the verbosity of
> old input style. You could easily write
>
> (list libiberty zlib) ; for objdump
What about 'libx11'? Otherwise, you end with cons (append for some
cases) or something along these lines,
(inputs
(cons
libx11
(list libiberty zlib))) ;for objdump
I am not convinced it is better...
> in the new style, which you couldn't before. Therefore, I wouldn't
Yes, I could do it in the old style:
`(("libx11" ,libx11)
("libiberty" ,libiberty) ("zlib" ,zlib))) ;for objdump support
I have never read such thing. And I miss your point because from my
understanding, it is not related to old style (list using labels)
versus new style (just list).
> mandate a "one line per input" restriction, as the only reason it was
> ever imposed was a historical limitation.
I miss your comment here. It is possible to write
(inputs `(("foo" ,bar) ("baz" ,done)))
and I have not done stats but I guess the rule for old style is: one
item per line whatever the numbers, comments or length. Because, I
guess again, readibility matters. :-)
> > This would avoid “cosmetic” changes when adding/removing inputs
> > and/or comments.
>
> In my personal opinion, everything else being equal, changes to
> inputs/native-inputs/propagated-inputs should (almost) always be seen
> as changes to the field, as would be documented in the ChangeLog.
>
> I think the usual scheme coding guidelines also apply well to inputs,
> e.g. inline short stuff, but don't do funky things when the lines grow
> unnecessarily long.
If that argument holds, then why is it not applied for old style? ;-)
We do not read,
--8<---------------cut here---------------start------------->8---
(native-inputs
`(("pkg-config" ,pkg-config) ("python" ,python-wrapper)))
--8<---------------cut here---------------end--------------->8---
for gnu/packages/video.scm (mediasdk) as example.
Cheers,
simon
next prev parent reply other threads:[~2021-12-22 21:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 13:05 Convention for new “guix style“? zimoun
2021-12-22 14:10 ` Jelle Licht
2021-12-22 15:52 ` zimoun
2021-12-22 19:24 ` André A. Gomes
2021-12-22 17:23 ` Vagrant Cascadian
2021-12-22 17:48 ` Andreas Enge
2021-12-22 21:18 ` Liliana Marie Prikler
2021-12-22 21:17 ` indieterminacy
2021-12-23 10:13 ` Ricardo Wurmus
2021-12-22 21:56 ` zimoun [this message]
2022-01-03 15:02 ` Ludovic Courtès
2022-01-03 16:23 ` zimoun
2022-01-03 19:48 ` Leo Famulari
2022-01-03 19:51 ` Leo Famulari
2022-01-03 20:05 ` zimoun
2022-01-05 19:16 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ3okZ2fXB-pVFJib0-7b1S0ZYLxNxT5=h2W2oGOuO-U=SUf=g@mail.gmail.com' \
--to=zimon.toutoune@gmail.com \
--cc=guix-devel@gnu.org \
--cc=liliana.prikler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.