all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Gabriel Wicki <gabriel@erlikon.ch>
Cc: guix-devel@gnu.org
Subject: Re: Removing package input labels: last call!
Date: Sat, 10 Jul 2021 16:38:29 +0200	[thread overview]
Message-ID: <87v95ib5ei.fsf@gnu.org> (raw)
In-Reply-To: <20210707122928.6s34jblnx5zhvd5f@knurd> (Gabriel Wicki's message of "Wed, 7 Jul 2021 14:29:28 +0200")

Hi Gabriel,

Gabriel Wicki <gabriel@erlikon.ch> skribis:

>  - Since not all the inputs *have* to be converted to the new format:
>    is this more some kind of syntactic sugar and less of a "we really
>    want this to be the new standard" kind of improvement?
>    Or is the goal to replace *all* input lists with the new style?

The goal is to replace all input lists with the new style.  We know
it’ll take time, but hopefully automation will reduce that.

>  - Regarding the speed of the transition: do I understand correctly that
>    the script should be able to convert the vast majority of packages
>    and that afterwards maybe other definitions will/might/could be
>    translated by hand?

Yes.  ‘guix style’ can translate “simple” cases, and it has three
strategies now (via the ‘--input-simplification’ option) with varying
degrees of impact.

More complex cases will have to be translated by hand over time.

>  - Follow up: is your intention to adjust the script to work with more
>    and more package definitions or are you leaning into a more "let's
>    have a sound script which is useful for many cases but leaves a
>    biggish bunch of manual labor but at least it won't break a thing"
>    kind of solution?

We can always improve the script if we find that it doesn’t handle
idioms that are quite widespread.  We can reduce the amount of manual
labor but it won’t be zero.

>  - Is there a way to check the integrity of a package definition
>    *without* building the whole thing?  I had some ideas (see below)
>    for adding special cases to your `guix style` script but was unable
>    to test whether they actually work (because compiling tonnes of
>    codes unsurprisingly takes quite some time).

Yes, you can run ‘guix build -d PACKAGE’ before and after running ‘guix
style’ and confirm the derivation is the same (this is for
‘--input-simplification=silent’).

> What I found:
>  - Small things like libX11 vs libx11.  If I understood correctly the
>    new patch series takes care of this case.

Yes, with ‘--input-simplification={safe,always}’.

>  - I think there's a whole class of cases where version-names and
>    other package-definition specifics make the "does-the-package-name-
>    match-the-label-exactly" algo fail:
>     - ,python-wrapper vs. "python"
>     - ,python-minimal-wrapper vs. "python"
>     - ,python2 vs. "python"
>     - ,python-cython vs. "cython"
>     - ,iproute2 vs. "iproute"
>     - etc

True!  ‘guix lint -c input-labels’ reports tons of them, but ‘guix
style --input-simplification=safe’ should also handle most of them
(though I didn’t measure that).

At worst we can always add special cases to the ‘label-matches?’
predicate.

Thanks for your feedback!  It’s very useful to have feedback from
another person who’s looked into it and who might find issues that have
been overlooked.

Ludo’.


      reply	other threads:[~2021-07-10 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 13:40 Removing package input labels: last call! Ludovic Courtès
2021-07-07 12:29 ` Gabriel Wicki
2021-07-10 14:38   ` Ludovic Courtès [this message]

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=87v95ib5ei.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=gabriel@erlikon.ch \
    --cc=guix-devel@gnu.org \
    /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.