From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, 29745@debbugs.gnu.org
Subject: Re: Why should build phases not return unspecified values?
Date: Wed, 20 Dec 2017 10:27:16 +0100 [thread overview]
Message-ID: <87609121hn.fsf@gnu.org> (raw)
In-Reply-To: <8737462yft.fsf@netris.org> (Mark H. Weaver's message of "Tue, 19 Dec 2017 16:35:34 -0500")
Howdy,
Mark H Weaver <mhw@netris.org> skribis:
> I don't think we should rely on every "unspecified value" being treated
> as #true in future versions of Guile. That is merely an accident of the
> current implementation.
>
> However, I also agree that the current situation is a mess in need of
> cleaning up.
>
> My preference would be to deprecate the practice of returning explicit
> boolean results from phases and snippets, and transition to reporting
> errors exclusively using exceptions.
Yes, that sounds more in line with what we usually do.
> We would create a variant of the 'system*' procedure that raises an
> exception in case of a non-zero status code.
Indeed. Like Danny wrote, we can already start migrating to ‘invoke’,
which does exactly that.
> Here's a transition plan: We could start by making the new
> exception-throwing 'system*' variant, and switching existing packages to
> use it, while removing the related error-code plumbing. Once that work
> is done, we could change the code that calls snippets or phase
> procedures to ignore the result of those calls. Finally, we could
> remove the trailing #t's.
>
> What do you think?
That sounds good to me!
Concretely, we can:
1. Encourage use of ‘invoke’ when reviewing or writing new package
definitions;
2. Gradually migrate packages (we can do a bit of that in
‘core-updates’, though we won’t do full rebuilds at this stage).
How does that sound?
Thanks,
Ludo’.
next prev parent reply other threads:[~2017-12-20 9:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 23:28 Why should build phases not return unspecified values? Arun Isaac
2017-12-17 7:03 ` Pjotr Prins
2017-12-17 7:10 ` Alex Vong
2017-12-17 8:22 ` Arun Isaac
2017-12-17 10:35 ` Clément Lassieur
2017-12-18 9:40 ` Andy Wingo
2017-12-19 21:35 ` Mark H Weaver
2017-12-20 2:15 ` Danny Milosavljevic
2017-12-20 9:27 ` Ludovic Courtès [this message]
2017-12-20 10:15 ` Ricardo Wurmus
2017-12-20 10:27 ` Arun Isaac
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=87609121hn.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=29745@debbugs.gnu.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.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).