From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OF7NAG1nFGIPwgAAgWs5BA (envelope-from ) for ; Tue, 22 Feb 2022 05:32:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SE0nOWxnFGK+xQAAauVa8A (envelope-from ) for ; Tue, 22 Feb 2022 05:32:44 +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 8652A36527 for ; Tue, 22 Feb 2022 05:32:44 +0100 (CET) Received: from localhost ([::1]:35376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMMqv-0001Ml-Px for larch@yhetil.org; Mon, 21 Feb 2022 23:32:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMMqF-0001MI-IK for guix-devel@gnu.org; Mon, 21 Feb 2022 23:32:00 -0500 Received: from mugam.systemreboot.net ([139.59.75.54]:43784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMMq3-0002oC-TN for guix-devel@gnu.org; Mon, 21 Feb 2022 23:31:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Tvjva/GRZhPmZuSvGgy1udq0XgGhV9MjlsGzQQhC+7c=; b=X+iEbjw65nQHbnwHswNS8Qztpe W28zfO8g29QgrGN39Milu4RXwxxFK24jdfYEYquQIy/DjvDaUH26pc16rN1x2GfxeSvGeTZOgQbro g79HZIFr9m1r40iSMh9yUKYABofNzzBsfH5CPEx9dBKO86bpFMW4WHTY3Cl5hMbqaRd/P0qGQAFnc sfYBlFlQzvNFAsfsrbEpobYkkQwGjLi55qR/EI/kcqsOUzUF4x2ZcS0+0BfahLb3qNXjGdABjfE7T p1LGjw2j411chIobnYimDI0suzDSvuzm3lnjHd6g9vM5HwTKsQCXNOUR81qousEaWSEacAUoLy57n DotO0H3Q==; Received: from [192.168.2.1] (port=8758 helo=steel) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nMMpw-000emM-Dk; Tue, 22 Feb 2022 10:01:40 +0530 From: Arun Isaac To: Ricardo Wurmus , guix-devel@gnu.org Subject: Re: better error messages through assertions In-Reply-To: <87ilthoxvu.fsf@elephly.net> References: <87ilthoxvu.fsf@elephly.net> Date: Tue, 22 Feb 2022 10:01:35 +0530 Message-ID: <877d9n7c9k.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net 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, 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: , 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=1645504364; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Tvjva/GRZhPmZuSvGgy1udq0XgGhV9MjlsGzQQhC+7c=; b=ZHj1g72ak0v8l/PFLR/XFn65I/pv+NzaX0rh2S6+55KzPo8RgiB+VD8gWNRIjwj/WodUTS p5Tf3anoNkTTb4HRnXaPajTH0qrw5RPY0vH7RVrw+IeJ5mvBOGnR1+FJX6GRPNG1eUyKFJ Njwo/R9LlDCRl41NPO+zBIWkSgtf9GilNeBls66u8Yf5afq/D8swJmq4JHWPQeqS054Oqi 5pk+5uLgooxbvOPlNHj8amSS5L8PAw8c587RYQ1mzEgY1VagfWnEo5ipFRKQsF6LyINzAk QaR6CLnaZya7D4fKPYZ3aaYyjkqnqO6u2uSey5+bBW1jL16geUU/SwucHmw3rA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645504364; a=rsa-sha256; cv=none; b=a5s60wo0rKodPvxXyRAIJyzK0m7B/SBa61JIfxsRqBAoDys0gmNdzXwlhWAC67uGuUtOA5 Y/OGs/EWSIZUSGiYw8UWh/zAu7KcY7zJbSr1q96wGTqDZVHF9cmNl5koDUr+ZbMNe/v6jB 23zU4UuVQhFssV4DA2Z3xRYKnRVqASLV6cJePy2npi3a57DrM3XEox2RsIbOWtkRj8HfZV niPyrUSGIOjU0hXMB/Ih4LqI0QRTBEfVrnRubyuursTWmIgDnDrQ/7i+rmkf+LPkBiGmAS pLQHy7/KI6IeJhgoAICWp/aUuSj9EurzT1milfink4YQcXy9I4Ul9OgiOxaPQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=X+iEbjw6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=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: -4.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=X+iEbjw6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=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: 8652A36527 X-Spam-Score: -4.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: HhRnfijDCCr2 --=-=-= Content-Type: text/plain Hi Ricardo, I too would like to see much better error checking for our services, though I don't know what the best way to achieve that is. Type checking alone may not be sufficient. All types in a configuration record could be valid, but some combination of field values in the record may not be valid. For a quick and dumb example, it may not be allowed to configure a service to listen on a TCP port and a Unix socket at the same time, and we should error out if it is told to do so. For these use cases, we need to support more complex predicates that take the whole configuration record and check if it is valid. Regards, Arun --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmIUZycbHGFydW5pc2Fh Y0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzi9cH/2I5qPyX1t2WqX9sSe+F Dnz3t5FI6+pc+x8MVaN6JBL+en6OA6OuCph518YBX7N2d5XxwyqP3k9BaKcTj+fU LEOuFZuMTvcBuSHI9PDGXCI8iDoOPIZedyx+viGPUdeZqnClz4gG7Qlk1e2FGPgF EeBlfJN23Fw/Xh1GH+YOK40qD8ZktgyLGd7DtE5GtzptXQEcCiycMEONjBg2jsG4 vlqmdEAr+u8DxRRx9j3gYPDXmro1QkAO1C+wNzsYZbja4Kifam6PgmiOS//Dc9c/ xGXRlrNYpFD4UPb1/LPYMEISFETyXhkPMkKhLzOOPwQtZfe7YOCNte/1fnftBkF+ Z+c= =UGwa -----END PGP SIGNATURE----- --=-=-=--