From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Making substitute* throw an error if substition failed? Date: Tue, 18 Oct 2016 14:41:51 +0200 Message-ID: <87shrtltgw.fsf@gnu.org> References: <87twceh9h7.fsf@elephly.net> <874m4bfjfn.fsf@gnu.org> <20161017210836.GF14171@macbook42.flashner.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwTiO-0007Dq-Rd for guix-devel@gnu.org; Tue, 18 Oct 2016 08:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwTiL-0000j9-KB for guix-devel@gnu.org; Tue, 18 Oct 2016 08:41:56 -0400 In-Reply-To: <20161017210836.GF14171@macbook42.flashner.co.il> (Efraim Flashner's message of "Tue, 18 Oct 2016 00:08:36 +0300") 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: Efraim Flashner Cc: guix-devel Efraim Flashner skribis: > On Mon, Oct 17, 2016 at 10:50:36AM +0200, Ludovic Court=C3=A8s wrote: >> Hi, >>=20 >> Ricardo Wurmus skribis: >>=20 >> > it happened a couple of times already that a =E2=80=9Csubstitute*=E2= =80=9D expression >> > silently failed and I only found out about it when investigating the >> > remains of a failing build (=E2=80=9Cguix build -K=E2=80=9D). This ca= n easily happen >> > when a package is updated and substitutions =E2=80=9Canchors=E2=80=9D = no longer exist in >> > the updated source code. >> > >> > Would it be desirable to change =E2=80=9Csubstitute*=E2=80=9D (or repl= ace it) such that >> > it throws an error or returns a value if substitution failed? >>=20 >> =E2=80=9CFailed=E2=80=9D as in =E2=80=9Cthere were no pattern matches=E2= =80=9D, right? >>=20 > > Or as in "your regex was bad, try again" That already happens. Ludo=E2=80=99.