all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: 02/03: build: go-build-system: Use WHEN for side-effect conditionals.
Date: Sun, 05 May 2019 21:56:00 -0400	[thread overview]
Message-ID: <8736lss5v8.fsf@netris.org> (raw)
In-Reply-To: <20190506000950.59FE5207E0@vcs0.savannah.gnu.org> (guix-commits@gnu.org's message of "Sun, 5 May 2019 20:09:50 -0400 (EDT)")

Hi Maxim,

guix-commits@gnu.org writes:

> apteryx pushed a commit to branch master
> in repository guix.
>
> commit 7e84d3eef724ef18f8e1c1b0932b6f74d3ae3e35
> Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Date:   Thu Apr 4 23:26:04 2019 -0400
>
>     build: go-build-system: Use WHEN for side-effect conditionals.
>     
>     * guix/build/go-build-system.scm (unpack): Replace single branch `if' by
>     `when'.

The summary above does reflect the changes made:

> diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
> index 973ee6e..92a5c86 100644
> --- a/guix/build/go-build-system.scm
> +++ b/guix/build/go-build-system.scm
> @@ -158,6 +158,10 @@ unpacking."
>        ((display "WARNING: The Go import path is unset.\n")))
>    (if (string-null? unpack-path)
>        (set! unpack-path import-path))
> +  (when (string-null? import-path)
> +    ((display "WARNING: The Go import path is unset.\n")))
> +  (when (string-null? unpack-path)
> +    (set! unpack-path import-path))
>    (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path)))
>      (mkdir-p dest)
>      (if (file-is-directory? source)

You added the 'when's, but left the 'if's, so now it's redundant.

Also, please remove the extra pair of parentheses around the WARNING.
If that code is ever run, it will result in an error, because it will
try to call (as a procedure with no arguments) the value returned by
'display'.

      Thanks,
        Mark

       reply	other threads:[~2019-05-06  1:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190506000949.28953.40456@vcs0.savannah.gnu.org>
     [not found] ` <20190506000950.59FE5207E0@vcs0.savannah.gnu.org>
2019-05-06  1:56   ` Mark H Weaver [this message]
2019-05-06  2:50     ` 02/03: build: go-build-system: Use WHEN for side-effect conditionals Maxim Cournoyer
     [not found] ` <20190506000950.7F51D206AB@vcs0.savannah.gnu.org>
2019-05-06  2:01   ` 03/03: build: go-build-system: Ensure uniform unpacking directory Mark H Weaver
2019-05-06  3:09     ` Maxim Cournoyer

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=8736lss5v8.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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.