unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: 02/03: build: go-build-system: Use WHEN for side-effect conditionals.
Date: Sun, 05 May 2019 22:50:30 -0400	[thread overview]
Message-ID: <87muk0cn49.fsf@gmail.com> (raw)
In-Reply-To: <8736lss5v8.fsf@netris.org> (Mark H. Weaver's message of "Sun, 05 May 2019 21:56:00 -0400")

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> 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.

Good observation! As you observed in another reply, the removal of the
IFs was recorded as part of the following commit... Sorry for the confusion!

> 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'.

Fixed in 2edec51c5e.  Thanks!

  reply	other threads:[~2019-05-06  2:50 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   ` 02/03: build: go-build-system: Use WHEN for side-effect conditionals Mark H Weaver
2019-05-06  2:50     ` Maxim Cournoyer [this message]
     [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

  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=87muk0cn49.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --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).