From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac Subject: Why should build phases not return unspecified values? Date: Sun, 17 Dec 2017 04:58:15 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQLsg-000468-66 for guix-devel@gnu.org; Sat, 16 Dec 2017 18:28:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQLsb-0007vR-94 for guix-devel@gnu.org; Sat, 16 Dec 2017 18:28:34 -0500 Received: from [2001:19f0:5:274f:4827:c39:448f:6777] (port=45236 helo=vultr.systemreboot.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eQLsa-0007nn-L3 for guix-devel@gnu.org; Sat, 16 Dec 2017 18:28:29 -0500 Received: from [117.192.101.216] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eQLsU-0001II-PR for guix-devel@gnu.org; Sun, 17 Dec 2017 04:58:22 +0530 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: guix-devel@gnu.org 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?