unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Removing package input labels: last call!
@ 2021-06-29 13:40 Ludovic Courtès
  2021-07-07 12:29 ` Gabriel Wicki
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-06-29 13:40 UTC (permalink / raw)
  To: guix-devel

Hello Guix!

Just a heads-up: I plan to go ahead with the proposal to remove package
input labels on ‘core-updates’ in the coming days if there are no
objections:

  https://issues.guix.gnu.org/49169

I’m still interested in hearing about special cases that do not have an
obvious “translation”, and about any other concerns you may have.

Thanks.  :-)

Ludo’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing package input labels: last call!
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Wicki @ 2021-07-07 12:29 UTC (permalink / raw)
  To: guix-devel

Hi!

I hope I'm not too late!  I've given the patch a try and have a couple
of questions:

 - 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?

 - 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?
 - 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?

 - 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).


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

 - 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

I've written some code and tested it with some specific package
definitions but since I was unable to test whether these substitutions
actually work for *all* package definitions I'll just leave these
remarks here :)


I hope this is somewhat help- or useful.

Gabriel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing package input labels: last call!
  2021-07-07 12:29 ` Gabriel Wicki
@ 2021-07-10 14:38   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2021-07-10 14:38 UTC (permalink / raw)
  To: Gabriel Wicki; +Cc: guix-devel

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’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-10 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).