guix-devel
[Top][All Lists]
Advanced

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

Re: Building a software toolchain that works


From: zimoun
Subject: Re: Building a software toolchain that works
Date: Thu, 17 Mar 2022 10:20:23 +0100

Hi,

On Tue, 15 Mar 2022 at 09:19:50 +0100, Ludovic Courtès <ludo@gnu.org> wrote:

> > One could develop a `guix contribute <package>` subcommand or standalone
> > script that would implement the following workflow:
> >
> > 1. Obtain the source and unpack it into a writable working directory,
> >    skipping downstream patches and snippets.
> > 2. Drop the user into a shell with the build and test inputs present.
> >    Perhaps with the scripts $PWD/.guix/test and $PWD/.guix/build added
> >    to run the build and test actions as needed.
> > 3. After the user has made changes, and maybe signalled completion
> >    somehow, run the tests and build all outputs.
> > 4. Once the user exits, output a diff that's suitable for git send-email.
>
> I like that idea, that’d be a great tool to have!  And indeed, we have
> all the building blocks.

While I agree the idea looks nice, the point #1 does not appear to me
straightforward.

a) The point #1 «skipping downstream patches and snippets» means that
the user would access to upstream source as is.  Therefore, I would like
to point the endless discussion about “guix build --source”.  Because
allowing to obtain the source skipping downstream patches and snippets
would be in contradiction with the rationale behind “guix build -S”,
IIUC.

Personally, I am in favor to have an option to be able to access to the
true upstream source – I have an half-baked script for that :-) – and
not the Guix-modified one – always for good reasons hardly justified.

Reading the lengthy backlog on this very topic, the main argument
against this option (implied by #1) is the poor written FSDG; leading to
various interpretations of the ’spirit’.  All arguments are valid. :-)

My point is, yes we have all the building blocks but, from my
understanding, we disagree about the way – how the end-user would access
to them.

b) Aside this potentially controversial point about «skipping downstream
patches and snippets», a nice workflow could be:

  i. Fetch the source that Guix builds and put it in a writable
  directory.
  
  ii. Extract the current Guix recipe and put it in guix.scm pointing to
  this working directory.

  iii. “guix build -f guix.scm“ or jump to a development environment
  cooked by ‘guix shell’ using this guix.scm

Well, iii) is already done – modulo corner cases, i) is almost ready –
missing glue for moving from the store to a writable directory; maybe a
addition to ‘guix build’

The missing, but not that hard I guess, is ii); maybe an addition to
‘guix edit’ as ‘guix edit --extract’.

The workflow would read:

    guix build --writable-source=/tmp/foo foo
    cd /tmp/foo
    guix edit --extract > guix.scm
    guix shell -Df guix.scm editor git:send-email

    editor bar baz
    git send-email

Personally, I would prefer to do it re-using existing subcommands than
only one doing all in one go.

Cheers,
simon





reply via email to

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