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 ms5.migadu.com with LMTPS id YH+zNYsl82JTfgAAbAwnHQ (envelope-from ) for ; Wed, 10 Aug 2022 05:27:08 +0200 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 0GGtNIsl82JIDAEAG6o9tA (envelope-from ) for ; Wed, 10 Aug 2022 05:27:07 +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 81C5AA318 for ; Wed, 10 Aug 2022 05:27:07 +0200 (CEST) Received: from localhost ([::1]:47420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLcN7-0004fQ-EG for larch@yhetil.org; Tue, 09 Aug 2022 23:27:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLcN4-0004fH-Ij for bug-guix@gnu.org; Tue, 09 Aug 2022 23:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLcN4-0001YD-AG for bug-guix@gnu.org; Tue, 09 Aug 2022 23:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLcN4-0005vm-6R for bug-guix@gnu.org; Tue, 09 Aug 2022 23:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56799: (gnu services configuration) usage of *unspecified* is problematic Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 10 Aug 2022 03:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56799 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Attila Lendvai Cc: 56799@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 56799-submit@debbugs.gnu.org id=B56799.166010199922765 (code B ref 56799); Wed, 10 Aug 2022 03:27:02 +0000 Received: (at 56799) by debbugs.gnu.org; 10 Aug 2022 03:26:39 +0000 Received: from localhost ([127.0.0.1]:45708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLcMg-0005v7-NM for submit@debbugs.gnu.org; Tue, 09 Aug 2022 23:26:39 -0400 Received: from mail-qv1-f44.google.com ([209.85.219.44]:42720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLcMd-0005us-6X for 56799@debbugs.gnu.org; Tue, 09 Aug 2022 23:26:36 -0400 Received: by mail-qv1-f44.google.com with SMTP id ct13so10070580qvb.9 for <56799@debbugs.gnu.org>; Tue, 09 Aug 2022 20:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=iYE79tqWJv9Q6TB5Mq5C7e/gamV80EpGXZx57cEkF3M=; b=e6eHGbunhfIGPZWr+U5RSBBk2K/vBHfoq+Y1na+QrtUyMSE9yJgulSS0+NfeeeyZdx fXeYNUEI87eikRvQxzYXB4FXmptJDX7B6NDWwbfTN31wEM1hS6vu3352KaHAwIoGVScP ZePEy+m2qOmybALu1wfI1yD3OjmXbnyzvUZ4uOyeuIc9XlYT/BQG9SvpYtyud3EOhkOy 5JZcIv5pswwmywXUYyD5hhKgLv+0Hlo8R4hN9V08ej4rCqj3MTcMRJqBP8oVEGeWX2nH rnZlMaSq3RHJz/0sPpCsp0NoyokoXuJrFCh/NXrxCR/+i0CFJ0xTmBDN/Uf6u/oNd+wx nZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=iYE79tqWJv9Q6TB5Mq5C7e/gamV80EpGXZx57cEkF3M=; b=hACUiv6r+kaNJDmjPUyernsAg1LDZcbC5HWPCnFHDzQ3PzLJ/UZ1VmabBZfHSUuUNP 3v6ASQSD/of7M3YFjChKy/k+Zs9KF0oV+TNKGg6bhl15+wd72Qe4Gyb5fVkE1dhzPmZn QUosq172j7i5sFO4+s8LQtTKS9U/SEEmq+zPQte/CumMymD33JNyBrzuopzsrEXq30AA 8IalWVlN9/7/geKPUaBFSMwxbakRNGH/fRQGbmjYRleh345YO85wXsykkR9x0m4+2BuA eZEet8xlhPydKECPVtF3nYGRtibgPe727omAZNgomi+52Jl/J9bSj+lSmmGiKabTzxpw n/GA== X-Gm-Message-State: ACgBeo3+h0gpSIJ7FK5lhs/qZPWjwp9Eg6x4j7fwVJr4IM6NiYe7AvJ2 R6M5TNA2VsYkJbfjza87ePKO4Zlwh98= X-Google-Smtp-Source: AA6agR6WMp583SCp+pZgQMX1HLz+4SXNPtjwEE/oaseaJ/uz4Qr2Ajr1sV1vOlDfweF8fdASYyXkvQ== X-Received: by 2002:a05:6214:2342:b0:473:e142:f758 with SMTP id hu2-20020a056214234200b00473e142f758mr22664561qvb.83.1660101989294; Tue, 09 Aug 2022 20:26:29 -0700 (PDT) Received: from hurd (dsl-10-135-11.b2b2c.ca. [72.10.135.11]) by smtp.gmail.com with ESMTPSA id x8-20020a05620a258800b006b5e45ff82csm13127727qko.93.2022.08.09.20.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:26:28 -0700 (PDT) From: Maxim Cournoyer References: <87o7xa8qxt.fsf@gmail.com> <8735egxedv.fsf@gnu.org> <87les82c2f.fsf@gmail.com> <87v8rbumnx.fsf@gnu.org> <87sfme1y8m.fsf@gmail.com> <877d3omc9c.fsf@gnu.org> Date: Tue, 09 Aug 2022 23:26:27 -0400 In-Reply-To: (Attila Lendvai's message of "Mon, 08 Aug 2022 22:27:32 +0000") Message-ID: <878rnwn5i4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660102027; 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: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=iYE79tqWJv9Q6TB5Mq5C7e/gamV80EpGXZx57cEkF3M=; b=R6igHK6fTf9RrCoPRztp1JuGJFa2WYOo9UYs9hNEu2MkE9Tr4pGbneExqiR4g/n5pD5HGg RNEiHT7EZKfvuyNIAgQ7yqZDVAkHYyUn76TbA9ZW4NFsFqPNzR1gWlb7Wk+RG3LN2OaS/U p8Kww0Ded8U6dhkRxDavqqFOP4X15rzah6K0wJWSVYMXDEw7JOpXoS2UFP4/dwMMW9msPE NBla4KXYzqz3Cr+hIxwIPWZX5YF8eCwmle4G6tz14jEG+DhvaGUE4XRcr99/jdcTWa1Djq fTBP0OPRkCpsIyrQO5kx7JYC98g14qqCvG04FcthvDioKc6VjcedsgQCCQHYtQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660102027; a=rsa-sha256; cv=none; b=Pf241iIXE6hbpyEoYkl39pTTszv/TNKi2J8gkUYkNY7gQBzp2ypmL5ZBmAr4fPVtdeQ9AL DHbJF+OJk2zliag5ZFqAiKv/HMKQL8vRZp0wkKDOvLHvYGFuZQTrEzkQ+mfgGmSSmQyhzn 4961qaDHtjf0/t1ZQ4Y1liP8CfeZHVS+w2cidMDaBsBlnWcmwe1cK/l8dJE41xR6fW24MX CiMrXqamh1xaIcBSESnke3FQMkMm8kOLERDAdpBrso/tzG7Z2GQdAx4VsYqE14qhrzNVEC 9+CKBfhb5LAf9thdTFAJf5BLAxAHuSir9iWvy1cVjqadk9WR5Bd/dhJJU9pMTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=e6eHGbun; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.11 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=e6eHGbun; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 81C5AA318 X-Spam-Score: 5.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: DrSWmP0njnvm Hi Attila, Attila Lendvai writes: [...] > also, seems like it didn't register in this discussion, so i press it > once again: if the default/unspecified value is a symbol (any symbol), > then those configuration fields, whose type is set to be of symbol, > will not error when they are left unspecified. (see the > FIELD-SANITIZER: it simply does a (IF (PRED VALUE) ...) check, which > doesn't fail because 'UNSET satisfies SYMBOL?). i should have added a > unit test for this... OK, I've reread this, and it is indeed a risk, that 'unset could leak in the case of a serializable configuration making use of a maybe-value field of type maybe-symbol. I've added the unit test suggested as 97cb43e732a38758c95b7caf3963507188d011cf (currently marked as 'expected to fail'). Luckily no current service uses that. I think the tension between serializable vs non-serializable unspecified values comes from the two kind of usages of define-configuration: one is to generate config files, in which unspecified means "nothing", and shouldn't touch disk, while in the case it's used as a more general data type (define-configuration/no-serialization), there is value in being able to lower that data type on the build/target so that things can be lazily computed where needed, without loss of information. We should add one more unit test to exercise this last usage in action (currently only jami-service-type makes use of that, but I have an upcoming Xvnc service that benefits from that as well). Thanks, Maxim