guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 02/03: build: go-build-system: Use WHEN for side-effect conditionals


From: Maxim Cournoyer
Subject: Re: 02/03: build: go-build-system: Use WHEN for side-effect conditionals.
Date: Sun, 05 May 2019 22:50:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Mark,

Mark H Weaver <address@hidden> writes:

> Hi Maxim,
>
> address@hidden writes:
>
>> apteryx pushed a commit to branch master
>> in repository guix.
>>
>> commit 7e84d3eef724ef18f8e1c1b0932b6f74d3ae3e35
>> Author: Maxim Cournoyer <address@hidden>
>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]