From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Making substitute* throw an error if substition failed? Date: Sat, 15 Oct 2016 00:05:56 +0200 Message-ID: <87twceh9h7.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvAcF-0006NY-Pm for guix-devel@gnu.org; Fri, 14 Oct 2016 18:06:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvAc9-0005a7-3L for guix-devel@gnu.org; Fri, 14 Oct 2016 18:06:10 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvAc8-0005ZO-Q7 for guix-devel@gnu.org; Fri, 14 Oct 2016 18:06:05 -0400 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 Hi Guix, it happened a couple of times already that a “substitute*” expression silently failed and I only found out about it when investigating the remains of a failing build (“guix build -K”). This can easily happen when a package is updated and substitutions “anchors” no longer exist in the updated source code. Would it be desirable to change “substitute*” (or replace it) such that it throws an error or returns a value if substitution failed? This might be helpful for the more complex packages with many substitutions. If we make it return a value (#f for error) it would also make our build phases a little prettier, I think. (Now we forcefully return #t in any case and that seems wrong.) ~~ Ricardo