From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IDwDANieNmXDfAAA9RJhRA:P1 (envelope-from ) for ; Mon, 23 Oct 2023 18:27:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IDwDANieNmXDfAAA9RJhRA (envelope-from ) for ; Mon, 23 Oct 2023 18:27:04 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9970730016 for ; Mon, 23 Oct 2023 18:27:03 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="PHi+/6mQ"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698078423; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=elsbaoWG0l7vf+kcYF5oirDmFQTqodq90zQqPyndFZg=; b=F/mGmtC6vEKVn60v+/rWeVN7RRirdgnh8sYb8J4WaBG7ZCK3ExBfQWYo2dy6HlewXZqCe2 Ry6yvxjXj/qLPVFpLzFQvXvmWD8L12nMgKAyHITkmR84mbIwv96SrG8Btq2vztgQ+Ffd1w KuKRE5QYMibeTsbQ4JfL61395VEUwefhpLgHbN1bfbLhtebynBLmPYnPWvKUevE6+NEr7O xqZKOKEoteokpoyoRly5iKYHp36xxWGFbFfUZ0TA6IK+A3bcO65kB1Hfp+vfvIEeHxTzxV J9dBdl+V8/z5HQak03wGvEqxBR1LPkAYSjD4n6KzMOf4f8TpDdhK67cCmbTa6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="PHi+/6mQ"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698078423; a=rsa-sha256; cv=none; b=tDQ+wPllvSUeqKJeKXhgzN6uLuXE5k+J2tPVpJDMnq39PZrmnGnMuEAkMmBeXrFB7gPcdg T63jfvteGIw2UpRnRzngylZNukJrS4VhZkqpy92OuELsp1ohCJfr8iuDBVgJGxqrvjpauH 2dlN/dFr8QNdRFac+sVIxXEo6V4TlwGtFZScfyk/b2OGNSQdg7l+eioWt59kfh7mqZtLnm 3pX4M7b37v0yt/B2F+A9rstOY5hfHUVnyIOflbEAkV4B4GjVLgkuhH9h3HA4Nk0B9cnNHX R42nma91u3AlS1Po8UXya7XwVIad1CrZoIKKvFun4uqubPdkZNGW2ZAt0EiiCg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quxlC-0005Qx-Cj; Mon, 23 Oct 2023 12:26:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quxlB-0005QJ-3S for guix-patches@gnu.org; Mon, 23 Oct 2023 12:26:33 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quxlA-0004nG-S2 for guix-patches@gnu.org; Mon, 23 Oct 2023 12:26:32 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quxld-0002uu-SQ for guix-patches@gnu.org; Mon, 23 Oct 2023 12:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Oct 2023 16:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42146 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= , 42146@debbugs.gnu.org Received: via spool by 42146-submit@debbugs.gnu.org id=B42146.169807836911129 (code B ref 42146); Mon, 23 Oct 2023 16:27:01 +0000 Received: (at 42146) by debbugs.gnu.org; 23 Oct 2023 16:26:09 +0000 Received: from localhost ([127.0.0.1]:51420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quxkm-0002tM-Hk for submit@debbugs.gnu.org; Mon, 23 Oct 2023 12:26:08 -0400 Received: from mail-vs1-xe34.google.com ([2607:f8b0:4864:20::e34]:50582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quxkh-0002si-Ti for 42146@debbugs.gnu.org; Mon, 23 Oct 2023 12:26:06 -0400 Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-457bc2de48dso1312793137.1 for <42146@debbugs.gnu.org>; Mon, 23 Oct 2023 09:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698078329; x=1698683129; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=elsbaoWG0l7vf+kcYF5oirDmFQTqodq90zQqPyndFZg=; b=PHi+/6mQr2PgBGpxQFTRAwzSUvtWTXyKtFZzv15v1hkaq8FJVjmFXE2rpLd5VFp6Bj onP6H9PwRkPLJspaionkpbpKwKOwNZDB25cnM4GjH4/XQIZDsQgbvGbp6jjYG0zxRRd7 7efDPUfThSX7hYPsqmsvrhjdD+HTevNeOtGH9GVmWIyETBh5/Ta24UKPJhnc6mLou3Is PYgshdaeGo0++4YoYcrJRlUe5erJJ6Y1D5JezKOK5FpPITTyc3N/iJegbXksOmoGWATT tPYPwkVuODj1fA/pxH0eX3c/vvostp6poxP+Q3xJeg6xlq3I6ZgCmDHoKu77u4ITEOSi xLVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698078329; x=1698683129; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=elsbaoWG0l7vf+kcYF5oirDmFQTqodq90zQqPyndFZg=; b=JmBgSXLfjJ4Et/UceOSHsBoTLe5aof+gVydoq1cYA1ft1Qfl8VVkK5st9gL+DvyGdW MWnswN29qB+Pxk0bMShS7VYpIDVTOcrV9qkKr6gvQKbEio4QWOat37L6/dXdnqTkfIlg 5WdNw+pmhnkV+6gfMCoxoCCzDkutq1K1TkXXUoyupFPZ/zIi8kkXY+YDAwf9ltyJlP+U DhiZAdK/7XEQFkaWz9dtCCFBu9iH905/i308AQ2NIvsWfMf6DPH45ymqi65rg2KLX/iv 6GSJDk4WSiYic6+05x21FFoNy2SCzGy3f9VWSfoEZHjdum/pewPfXN0waD+Tb0syHiYT 6J9g== X-Gm-Message-State: AOJu0YzkQcl7bM9BN5X6DQFgxDs4iAQt8skAPuimaPcb51qnuFlJ4q8d uUDmwg5OlVxo0RptIZT9lxo= X-Google-Smtp-Source: AGHT+IHqL23RqEYWop0jbtG3WJAmvYB+epKhszs8nFpBQ455D8Ldbf1go9RqJ/kzuVrIlp0H0IatVg== X-Received: by 2002:a05:6102:23d1:b0:452:5d45:6345 with SMTP id x17-20020a05610223d100b004525d456345mr9317150vsr.34.1698078329168; Mon, 23 Oct 2023 09:25:29 -0700 (PDT) Received: from hurd (dsl-10-148-194.b2b2c.ca. [72.10.148.194]) by smtp.gmail.com with ESMTPSA id az39-20020a05620a172700b00777611164c5sm2814103qkb.106.2023.10.23.09.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:25:28 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: <871qdliv1v.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 23 Oct 2023 10:48:12 +0200") References: <871qdliv1v.fsf_-_@gnu.org> Date: Mon, 23 Oct 2023 12:25:27 -0400 Message-ID: <87a5s971c8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.90 X-Spam-Score: 2.90 X-Migadu-Queue-Id: 9970730016 X-Migadu-Scanner: mx2.migadu.com X-TUID: sXBW2Ckfyw+2 Hi Ludo, Ludovic Court=C3=A8s writes: [...] >> @@ -1048,9 +1086,19 @@ (define-syntax substitute* >> Alternatively, FILE may be a list of file names, in which case they are >> all subject to the substitutions. >>=20=20 >> +By default, SUBSTITUTE* will raise a &message condition if one of the p= atterns > > I think it=E2=80=99s =E2=80=98&substitute-error=E2=80=99 rather than =E2= =80=98&message=E2=80=99. Good catch. Fixed. >> +(define-substitute*-test test-error "substitute*, partial no match erro= r" >> + #t ;expected >> + "a\0b" ;content >> + (("a") "c" >> + ("Oops!") "c")) > > Maybe it=E2=80=99s not all that important here, but I think =E2=80=98test= -error=E2=80=99 tests > for any exception, whereas we=E2=80=99re looking specifically for a > =E2=80=98&substitute-error=E2=80=99 condition filled with the right value= s. I thought test-error was limited in srfi-64 that made it not work with condition types, but it seems that's not the case and it actually does work: --8<---------------cut here---------------start------------->8--- modified tests/build-utils.scm @@ -320,8 +320,8 @@ (define-substitute*-test test-equal (("b") "d")) =20 (define-substitute*-test test-error "substitute*, no match error" - #t ;expected - "a\0b" ;content + &substitute-error ;expected + "a\0b" ;content (("Oops!") "c")) =20 (define-substitute*-test test-equal "substitute*, no match, ignored" @@ -331,8 +331,8 @@ (define-substitute*-test test-equal "substitute*, no ma= tch, ignored" #:require-matches? #f) =20 (define-substitute*-test test-error "substitute*, partial no match error" - #t ;expected - "a\0b" ;content + &substitute-error ;expected + "a\0b" ;content (("a") "c" ("Oops!") "c")) --8<---------------cut here---------------end--------------->8--- and all tests still pass :-). I'll send a v4. --=20 Thanks, Maxim