all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Making substitute* throw an error if substition failed?
Date: Sat, 15 Oct 2016 10:06:41 +0200	[thread overview]
Message-ID: <20161015100641.29d0ac0b@scratchpost.org> (raw)
In-Reply-To: <87twceh9h7.fsf@elephly.net>

Hi,

On Sat, 15 Oct 2016 00:05:56 +0200
Ricardo Wurmus <rekado@elephly.net> wrote:
> Would it be desirable to change “substitute*” (or replace it) such that
> it throws an error or returns a value if substitution failed?  This
> might be helpful for the more complex packages with many substitutions.
> If we make it return a value (#f for error) it would also make our build
> phases a little prettier, I think.  (Now we forcefully return #t in any
> case and that seems wrong.)

While it's a big change I am for substitute* throwing an error if it can't find one of the patterns - and #t otherwise. It's true that these substitutions that are necessary but cannot be found would not be noticed in a long time otherwise.

I'm against it returning a value #f in the error case - it should just unwind. If you don't want it to unwind (in a few cases) you can always protect against it manually.

  parent reply	other threads:[~2016-10-15  8:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 22:05 Making substitute* throw an error if substition failed? Ricardo Wurmus
2016-10-15  7:53 ` Hartmut Goebel
2016-10-15  8:06 ` Danny Milosavljevic [this message]
2016-10-15 17:07 ` Alex Kost
2016-10-17  8:50 ` Ludovic Courtès
2016-10-17 21:08   ` Efraim Flashner
2016-10-18 12:41     ` Ludovic Courtès

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=20161015100641.29d0ac0b@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /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.