From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ELw3C7hnhWO3FAEAbAwnHQ (envelope-from ) for ; Tue, 29 Nov 2022 03:00:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eOcmC7hnhWN0GgAAauVa8A (envelope-from ) for ; Tue, 29 Nov 2022 03:00:24 +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 D982ED189 for ; Tue, 29 Nov 2022 03:00:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozpuq-0002ma-LJ; Mon, 28 Nov 2022 21:00:08 -0500 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 1ozpup-0002mN-9Z for bug-guix@gnu.org; Mon, 28 Nov 2022 21:00:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozpuo-0006uQ-Uc for bug-guix@gnu.org; Mon, 28 Nov 2022 21:00:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozpuk-0001b4-RE for bug-guix@gnu.org; Mon, 28 Nov 2022 21:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59423: Invalid 'location' field generated in dovecot configuration Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 29 Nov 2022 02:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59423 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Pierre Langlois , 59423@debbugs.gnu.org Received: via spool by 59423-submit@debbugs.gnu.org id=B59423.16696871466101 (code B ref 59423); Tue, 29 Nov 2022 02:00:02 +0000 Received: (at 59423) by debbugs.gnu.org; 29 Nov 2022 01:59:06 +0000 Received: from localhost ([127.0.0.1]:52288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozptq-0001aL-2p for submit@debbugs.gnu.org; Mon, 28 Nov 2022 20:59:06 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:39591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozpto-0001Zx-QA for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 20:59:05 -0500 Received: by mail-qv1-f48.google.com with SMTP id r15so8268342qvm.6 for <59423@debbugs.gnu.org>; Mon, 28 Nov 2022 17:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=F0VQO2J+1f+HDUPuXX2G8oMhZe8Sop2UCOo8Yfeo41Q=; b=SjZpk9qvcBWI6QZRGBUaOSgUxvthT7S7DWFCfg/X6y7sSlmX+EmKywWJH8FHyKqv+d oimBzR4bMMn9bWjTo0hv28/uDk3AqEczm1OsDJh0GPT3ZOUh4KoiPMrH3OgGIiRfnUz0 szCe1oqvT4BuRJMDZXLhAbE0HUMmWTxfiMP7363fEKnW9bldL3EjRO7PvhJA2EeHEZgT Ltth13/i1EY1BfcT9+cU9OqrsNDzlWryQEJOxaVpP18SuFOLA1UEkfLLxZM2FCWlFjP3 pdnVy2JE9Sm7zkMFwwA+uNx2i+yoMQXp96GRVxYNYUT4eBUBFzbtP46QwbvQr9lgMiyz HR7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F0VQO2J+1f+HDUPuXX2G8oMhZe8Sop2UCOo8Yfeo41Q=; b=U1jtIpWbQmeSD72bv+uxyeC6AMQ/RXD0zi1WtpGXldovMrjTogjXmS//QQYVzPRCsu YCmPdOSo/l8E/5kwJI1gCi3UdMZ8OLWOek89Uza1c4eqnJQP8cp6eScmElgA4MOTMBuQ rVsPz49XViABRLlLgsE1QK7xsyDMN3L0sSDEL2103rkZHevT6kGRCbpCKhSsEYb0IjAN j8oc6tbKMWO6TjWG7Wje7EFATREG3GGpEtWKqqMjZo12EFNeoRpAp17YEmIO95aBT8O+ HEpz/sIibe5PDLFNJMc7m2JKatNvM6tYMp2KPAW4getpVLAJqbSHOJ7q2T1Kl10Wjj3V grwA== X-Gm-Message-State: ANoB5pm5W7tjhaIdyws02jSpalvaSrlpNXwe+oqEjHr3jSQE2pdxmbEp WI8XoqPgwHNKdCcKiQycvYMp/0merkOm/g== X-Google-Smtp-Source: AA0mqf4O9gF65BABFTls9ztanA3a/H0qO4fYF5sn7RVEovgv8hLEHnAo7FQLQFmywV7g0lY+2RdFJg== X-Received: by 2002:a05:6214:2ac:b0:4bb:6837:9f8a with SMTP id m12-20020a05621402ac00b004bb68379f8amr32172798qvv.66.1669687139089; Mon, 28 Nov 2022 17:58:59 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1004]) by smtp.gmail.com with ESMTPSA id x26-20020ac8539a000000b00398df095cf5sm7753394qtp.34.2022.11.28.17.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 17:58:58 -0800 (PST) From: Maxim Cournoyer References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> Date: Mon, 28 Nov 2022 20:58:57 -0500 In-Reply-To: <8735a2ahmi.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 28 Nov 2022 22:33:57 +0100") Message-ID: <87a64aseqm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: 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-bounces+larch=yhetil.org@gnu.org 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=1669687223; 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=F0VQO2J+1f+HDUPuXX2G8oMhZe8Sop2UCOo8Yfeo41Q=; b=bLRGB2rA83qoy7X6TH88e9t/LGr3Gl+XxRqR1sis+WlmcV8f44GcNO477HdjloPJTqhoPk VhlAuJ+MRbDYfrx34HTk/fB4qsxe6o3nGlslVp0G7IgZ3rNrBd/LO/jd2Dz+gsPgjwL3Hv XJBND3hAft1tiwhZv3g/zuYseBnNZGrBnBCzMWN/aKhvmYTu7Ep5t4MNvVfI1cGCPn99Pb J3iGuZ4ShHngLWv28lBOv/eqyKQKSWIvOtLjky1Tfgxt3lq3AOzyfrwDBVgtSd3toZLOie 6MHMeQKI9Tu3pWrcXx9Mc72Ob/EiAPntAHe6zBmRQxDX+nv8sk0eqlBIATGNcQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669687223; a=rsa-sha256; cv=none; b=dU0VgNPB9v2J0keA/XhsgxuHFsgEm6O6IUDhIH54QuTjCDokHLDMKTuk8OvjCZ/CAJrj/t iHGR+yxGhuc59sKAkFJ8zbGD/l6ByIgyEaxvE0f70F4hsORM9rM54zKivOLcI9pRVQ7lZO 93mFUOeQM6T4sgfKs055MOyl/IG33ufHCKjs/HGC94ORWzsWGbse8ONVz4sOOh+r3XL6Ia eBLwM0qO++2IAPmM7vWYuVw3QdOGEHOWiycz/o6hvIDarlqJFoZEhvwPwSofW9TfAYolSm ohbC44aXkgudliQhgIvNASEjShuoZmXzFOsDGYMUWT40vt2IGSUi5iJctthuqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SjZpk9qv; 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: 4.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SjZpk9qv; 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: D982ED189 X-Spam-Score: 4.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: axPeZY/OdaU8 Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >>> We have this: >>> >>> (define-record-type* #,(id #'stem #'< #'stem #'>) >>> stem >>> #,(id #'stem #'make- #'stem) >>> #,(id #'stem #'stem #'?) >>> #,@(map (lambda (name getter def) >>> #`(#,name #,getter (default #,def) >>> (sanitize >>> #,(id #'stem #'validate- #'stem #'- nam= e)))) >>> #'(field ...) >>> #'(field-getter ...) >>> #'(field-default ...)) >>> (%location #,(id #'stem #'stem #'-location) >>> (default (and=3D> (current-source-location) >>> source-properties->location)) >>> (innate))) >>> >>> That generates two accessors called =E2=80=98namespace-configuration-lo= cation=E2=80=99. >>> The second one shadows the first one. >> >> Yes. You didn't address my question directly though, so let me ask it >> again: where is this %location field access (named "location") used? [...] > =E2=80=A6 the field is accessed via its accessor, > =E2=80=98name-configuration-location=E2=80=99. We can kinda see it here: [...] > Each record has a =E2=80=98getter=E2=80=99 field th= at refers to > the accessor. In the case of =E2=80=98location=E2=80=99, that=E2=80=99s = the =E2=80=9Cwrong=E2=80=9D > accessor=E2=80=94the accessor of =E2=80=98%location=E2=80=99. > > I hope that addresses your question! No :-). I meant why do we even set a default accessor for the *source location* information (in the (gnu service configuration) macros); it's that one that doesn't seem to get used (or I'm blind to it!), at least via this accessor. If it's not strictly necessary, we can stop producing it, and that would solve the problem. Does that make sense? I'm not talking about namespace-location; that one has the right to be! I'm talking about the auto-generated x-location or y-location, where x and y are configuration records that were specified via 'define-configuration'. [...] > What would need renaming in this case is the accessor, not the field. > In you proposed renaming the > accessor to *-source-location instead of *-location. That sounds like a > good idea to me. We should get unbound-variable warnings in modules > that use the previous name, so we=E2=80=99ll see if that breaks something. > > The only downside is that the convention elsewhere in the code is > -location, not -source-location. What about giving it an even more cryptic accessor name like -%location or dropping it entirely as suggested above? > So the other option is to rename =E2=80=98location=E2=80=99 in > . That also has the advantage of being less > intrusive. I don't like that alternative, because 'location' seems likely to be used for future services and reintroduce the same name clash problem. --=20 Thanks, Maxim