From: zimoun <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Subject: Re: Building a software toolchain that works
Date: Thu, 17 Mar 2022 10:20:23 +0100 [thread overview]
Message-ID: <86ilsd3pgo.fsf@gmail.com> (raw)
In-Reply-To: <87o827ocex.fsf@gnu.org>
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
next prev parent reply other threads:[~2022-03-17 9:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 19:05 Building a software toolchain that works Ryan Prior
2022-03-14 20:26 ` Pjotr Prins
2022-03-14 21:40 ` David Arroyo
2022-03-15 8:19 ` Ludovic Courtès
2022-03-17 9:20 ` zimoun [this message]
2022-03-16 14:02 ` Josselin Poiret
2022-03-16 15:28 ` Ryan Prior
2022-03-16 20:13 ` Yasuaki Kudo
2022-03-17 15:35 ` Maxime Devos
2022-03-17 16:56 ` David Arroyo
2022-03-14 23:57 ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-15 8:23 ` Ludovic Courtès
2022-03-15 8:42 ` Pjotr Prins
2022-03-15 12:32 ` Yasuaki Kudo
2022-03-17 12:56 ` zimoun
2022-03-18 21:13 ` david larsson
2022-03-18 23:59 ` Yasuaki Kudo
2022-03-19 13:02 ` Windows Subsystem for Linux zimoun
2022-03-24 21:14 ` Ludovic Courtès
2022-03-25 3:43 ` Maxim Cournoyer
2022-03-25 9:04 ` Phil
2022-03-25 10:14 ` Oliver Propst
2022-03-17 20:04 ` Building a software toolchain that works Katherine Cox-Buday
2022-03-18 6:27 ` Pjotr Prins
2022-03-18 9:10 ` Oliver Propst
-- strict thread matches above, loose matches on Subject: below --
2022-03-17 12:06 zimoun
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ilsd3pgo.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--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 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).