From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: 02/03: build: go-build-system: Use WHEN for side-effect conditionals. Date: Sun, 05 May 2019 21:56:00 -0400 Message-ID: <8736lss5v8.fsf@netris.org> References: <20190506000949.28953.40456@vcs0.savannah.gnu.org> <20190506000950.59FE5207E0@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:46769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNSt5-0007h8-ME for guix-devel@gnu.org; Sun, 05 May 2019 21:57:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNSt4-00082S-NR for guix-devel@gnu.org; Sun, 05 May 2019 21:57:51 -0400 Received: from world.peace.net ([64.112.178.59]:44128) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNSt4-00082C-J4 for guix-devel@gnu.org; Sun, 05 May 2019 21:57:50 -0400 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)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Maxim Cournoyer Cc: guix-devel@gnu.org Hi Maxim, guix-commits@gnu.org writes: > apteryx pushed a commit to branch master > in repository guix. > > commit 7e84d3eef724ef18f8e1c1b0932b6f74d3ae3e35 > Author: Maxim Cournoyer > 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