all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Vong <alexvong1995@gmail.com>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: guix-devel@gnu.org
Subject: Re: Why should build phases not return unspecified values?
Date: Sun, 17 Dec 2017 15:10:19 +0800	[thread overview]
Message-ID: <87tvwpvnhg.fsf@gmail.com> (raw)
In-Reply-To: <cu7r2ru2qy8.fsf@systemreboot.net> (Arun Isaac's message of "Sun, 17 Dec 2017 04:58:15 +0530")

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Arun Isaac <arunisaac@systemreboot.net> writes:

> Whenever we have a build phase that ends with a call (for example, to
> substitute, chdir, symlink, etc) that returns an unspecified value, we
> append a #t so that the return value is a boolean. However, the build
> system, as it stands currently, does not mind an unspecified value, and
> treats it as a success. As a result, forgetting to add a #t at the end
> of custom phases is a common mistake. To fix this, I have submitted a
> patch at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29745 that
> modifies the build system to reject unspecified values as
> failures.
>
> However, IMO, the addition of #t at the end of certain phases, does not
> contribute anything of value and we should simply be at peace with
> phases returning unspecified values. Am I missing something here?
>
> WDYT?

I think the problem is that when the scheme standard says "the returned
value is unspecified", it means anything can be returned. In this case,
guile choose to return an unspecified value to avoid returning an
arbitary value.

I think the answer written by soegaard in [0] explains it pretty well.

[0]: https://stackoverflow.com/questions/28910911/detecting-unspecified-in-scheme-list

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2017-12-17  7:10 UTC|newest]

Thread overview: 13+ 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 [this message]
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
2017-12-20  9:27     ` [bug#29745] " Ludovic Courtès
2017-12-20 10:15     ` Ricardo Wurmus
2017-12-20 10:15       ` [bug#29745] " 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tvwpvnhg.fsf@gmail.com \
    --to=alexvong1995@gmail.com \
    --cc=arunisaac@systemreboot.net \
    --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 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.