From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 QOwoBcssGmIUCAAAgWs5BA (envelope-from ) for ; Sat, 26 Feb 2022 14:36:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GzJ7OcosGmJ/+AAAG6o9tA (envelope-from ) for ; Sat, 26 Feb 2022 14:36:10 +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 B13F52AE1A for ; Sat, 26 Feb 2022 14:36:10 +0100 (CET) Received: from localhost ([::1]:37038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNxF3-0001uP-Hy for larch@yhetil.org; Sat, 26 Feb 2022 08:36:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNxDo-0001ts-Kv for guix-devel@gnu.org; Sat, 26 Feb 2022 08:34:52 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNxDm-0002E2-FF for guix-devel@gnu.org; Sat, 26 Feb 2022 08:34:52 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1645882486; cv=none; d=zohomail.com; s=zohoarc; b=U3DHGPzoCRCB74QAyhiNaMoAmlR1aq/lLE9ukh3ZISL+Zh5swqORGS/9mvQWMDgrOipNOiRQYiNpMKihGe0hJGWmMzLBnTgWWBaThd1ipPlAR4tCUcpNy2znEsAhX+LUJameUa6JF0Dali+UB5pxoO+kurJNoCTu7w5Gh0v2TVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645882486; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JcNG+elxymwxDds9imxLImbejCjLH4Zyb5M0aM3hA1s=; b=WpFxtymDMMtKg/3SW3REWbqdY77KHmqWDdr6y12ERf/CyQRCbKy+dSuU8rVsjKhpA4VYTAwrktOSZqMze6BZ3m38L6bEShflHJtqCbWyNKVAeNtYS5XNcGuNJZwNtRiAXG7imMkS6UTPs4/EgB5QUSwKp3s4q94DfuQhXhBWZVw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1645882486; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=JcNG+elxymwxDds9imxLImbejCjLH4Zyb5M0aM3hA1s=; b=ifGbrdVW67B592m604eN4Par7HuiqmN3YRzSY2p6oSC0dwrRwwewLZ9MJWhHjv6W reCF7B6VLpLwos9+vcR/l2l0eNPfwHIg9x/y1f3jZHeWiFyM/F0iuxU9GktveCHFA14 Bh4SUXD68maWoPyGBxe+YmIvZtiQ8JmLC1Su7BX4= Received: from localhost (p4fd5a7a5.dip0.t-ipconnect.de [79.213.167.165]) by mx.zohomail.com with SMTPS id 1645882483225875.2925647542099; Sat, 26 Feb 2022 05:34:43 -0800 (PST) References: <87ilthoxvu.fsf@elephly.net> <875yp2zsgd.fsf@gmail.com> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Ricardo Wurmus To: Maxim Cournoyer Subject: Re: better error messages through assertions Date: Sat, 26 Feb 2022 14:33:08 +0100 In-reply-to: <875yp2zsgd.fsf@gmail.com> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87lexx7nv4.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645882570; 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:dkim-signature; bh=JcNG+elxymwxDds9imxLImbejCjLH4Zyb5M0aM3hA1s=; b=l4yJkJcTtIylFuqYuqT8E+eRMPE3jn0cORcgWAgqTehCnDpafH2CBajh9s+toAeyYPkhix W2eDXtFXtt0LgsUswWJwpQX69qvbZExKFVXChird+CLW6U/Ud3mcarGJnQbkzeNeg+Imi7 +HS02b0vHHYXpHT1vzaTjLA2W2vRjSdcKSHtx5pCZn2L2yRyQghGpmuBPiby02TI5E8tEy pTlZoleq9wrRehp1F7r7woYrd9ycCCdogxsz0+t6nVzyxzwvvwTphf+QVfigBl0FAXQL9+ f71ONknD7GSXCuDHTQD4KeDiiUNSNW6P202aHoryYdMDKu7yt7eBlmGje/GrRQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1645882570; a=rsa-sha256; cv=pass; b=eLIADs3iQTvTqH75zNTjMZqAYcwctxp26mju12sIfTkCsIxef8JWuCGPWnI892XJzOp1qx +PdJCZQzBy4Z+PsR+WdqXhG2UbvAsZdiCY4RZiqBuqO7ls4Ev+bNhzLsZM1Dy8AcZn/ETz PTb0DPKIPfZnP2cZZeY3RUlNNArgK0ZVigLtdS+DhHpfZYLOTHfLdwA5pPaRWkts+GdsQ1 GWARQ/OA4s4jputPZqil0fa5QFntA0ayFHuvql1Yp5C4QWkhsAKF/9Sos5KxRTcLJDHi7I jHPOoaNWbaqA82eJJgA47z4epresMnX+nqJpIA3PFFFrbjhUOlKZhxIHBwM4jw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=ifGbrdVW; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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: -10.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=ifGbrdVW; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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: B13F52AE1A X-Spam-Score: -10.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: CeWcHBGxR0e6 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 va= lues themselves are all right. It=E2=80=99s a procedure acting on what it assum= es is a list of service values that fails. Record field validation would not have prevented that error. --=20 Ricardo