From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WHk3EBnIHGIC8AAAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 14:03:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EEcADRnIHGK8dQEAauVa8A (envelope-from ) for ; Mon, 28 Feb 2022 14:03:21 +0100 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 E07DC2F57D for ; Mon, 28 Feb 2022 14:03:20 +0100 (CET) Received: from localhost ([::1]:53068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOfgN-0004TV-A3 for larch@yhetil.org; Mon, 28 Feb 2022 08:03:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOffP-000434-Cu for guix-devel@gnu.org; Mon, 28 Feb 2022 08:02:21 -0500 Received: from [2a0c:e300::1] (port=33802 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOffJ-0000pZ-C1 for guix-devel@gnu.org; Mon, 28 Feb 2022 08:02:19 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2BFCA26E; Mon, 28 Feb 2022 14:02:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1q3ioKo06s_T; Mon, 28 Feb 2022 14:02:10 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 417B3141; Mon, 28 Feb 2022 14:02:10 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: better error messages through assertions References: <87ilthoxvu.fsf@elephly.net> <875yp2zsgd.fsf@gmail.com> <87lexx7nv4.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 =?utf-8?Q?Vent=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 28 Feb 2022 14:02:09 +0100 In-Reply-To: <87lexx7nv4.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 26 Feb 2022 14:33:08 +0100") Message-ID: <87ilszdu0e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 2BFCA26E X-Spamd-Result: default: False [0.53 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.63)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,gnu.org] X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a0c:e300::1 (failed) Received-SPF: softfail client-ip=2a0c:e300::1; envelope-from=ludo@gnu.org; helo=hera.aquilenet.fr X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646053400; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jm3uUwELXsbll06TuLccgAGcyecNUgbPJOB0gaIHF2c=; b=qsiNs1dDHj/hA3W6k3WFB8Dm1nZb25tZxpvuBKqrqZZ6mpotGTD1VeL+17+hX+EYSIMl9C tlwa8OEaAnaYzjxwmyZaISj8ahto9piXsTO1YRtIkLK8meEhRV9HNna889z7832xV0fNHz 9GO9tG1kYJzi9pkQS2nkZ0mBYZwadtt+gnR3OvcyfysXOTPTmqExnoWVY2DaP47Z3yiwZN fVblM4hGoSmAt70pxNtxn8zgHVlHhluXdPiAn4Mc82a0sIg8YiyvmZYUkhnLNgI+3RDUMY ThdFL7crrYP/WFJUUrA2FhztALA+8C9ba1+IENaKSOoScZiQb2d9AqCSUcczdw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646053400; a=rsa-sha256; cv=none; b=rfxYRvDYeptKME+pWPEG2lU0j4jAakdrrbPY3wsWyJYaWtf60H9Hh1T1c9Dosdr9ZUPELn iNnai60TQbJxvPM36WLJjAJ7wzGtjbyBLg4MTEa+fy82UhFYfy33P1ZnBh4CErAH4UR73k TZHjCVHTuxfEPlQBRIwSd4ElrmXv1FFnA5IqsiKupAUnH2GHdNJOkU/xzJl5w+EbS85/Dd Azw1f2Z9v6jSjh+3eM2C0OPU9GsM5Lqio6SC4TZIADH6cDqaxdYjixF7jb/Q4kCW97uYw9 5JyxN65Q87HVSYYUXpH4nI/t7eRc3gQNHpQg6cG1wcZ3xU1liwbrWF8xFltHNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.10 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E07DC2F57D X-Spam-Score: -4.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: YrGL5ZImguOT Ricardo Wurmus skribis: > Maxim Cournoyer writes: > >> I hear we now have "field sanitizers" on Guix records; without having >> dug the details, it seems to be we could add a predicate validating the >> input there? > > I don=E2=80=99t see how that would help here. In my example the service = values > themselves are all right. It=E2=80=99s a procedure acting on what it ass= umes is > a list of service values that fails. > > Record field validation would not have prevented that error. I think we could validate primarily at the user/core boundary. If the =E2=80=98services=E2=80=99 field had a sanitizer ensuring it=E2=80=99s a li= st of services, then it=E2=80=99d be fine. Ludo=E2=80=99.