From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YJfCHdMThWMtBQEAbAwnHQ (envelope-from ) for ; Mon, 28 Nov 2022 21:02:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4AamHdMThWM5MQAA9RJhRA (envelope-from ) for ; Mon, 28 Nov 2022 21:02:27 +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 2BD8FDD7F for ; Mon, 28 Nov 2022 21:02:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozkKL-0004QN-3W; Mon, 28 Nov 2022 15:02:05 -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 1ozkKI-0004Pu-LR for bug-guix@gnu.org; Mon, 28 Nov 2022 15:02:02 -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 1ozkKI-0006bv-CU for bug-guix@gnu.org; Mon, 28 Nov 2022 15:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozkKH-0001qF-UQ for bug-guix@gnu.org; Mon, 28 Nov 2022 15:02:01 -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: Mon, 28 Nov 2022 20:02:01 +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.16696656777044 (code B ref 59423); Mon, 28 Nov 2022 20:02:01 +0000 Received: (at 59423) by debbugs.gnu.org; 28 Nov 2022 20:01:17 +0000 Received: from localhost ([127.0.0.1]:50583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozkJY-0001pY-PF for submit@debbugs.gnu.org; Mon, 28 Nov 2022 15:01:17 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:42882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozkJW-0001pS-9v for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 15:01:14 -0500 Received: by mail-qt1-f173.google.com with SMTP id h24so7478506qta.9 for <59423@debbugs.gnu.org>; Mon, 28 Nov 2022 12:01:14 -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=GXm4QlejbQ7viDyTi/OclQr2cs7wHrpO0VxGuVNUkn0=; b=JtoDxYiANdDnZVnNzXEudDzPZTCs33wjxugcmccmpJnhNUSf+/myxjt1EwpOntg2ZV dHn/NBvXKxPP+nGUxAC0fvVunDZq8ftNmzhBwAAml7J1JQnJHnav5EdyPRHQfpuulkYT ca01kQmVYaIGMS0Hj352gRmE5BaJdwieU0pZGD2mjjpDT/OdyoI7Hhl+2zuaZ7i7/Bz+ oeUunY7yAPqp7GfBoOLr6xkhDplI3+cCP1zPHkbYFecnAwM+1hyr5cJhpmtrmJ9VN7VF KhyKLlPp+0hSsH/+2FKpaGM06M1qouOsYUFcJ813/MBpmku8P8eYb1N2cLsI5oZf6TxX WSOw== 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=GXm4QlejbQ7viDyTi/OclQr2cs7wHrpO0VxGuVNUkn0=; b=miAOkrOEulTrAGFW3t5Db03LQpXLkH3ZoKCDDQMauzEHGrPUTbMOAmFDXfBGpWFpYY TIzITuLlIR1kK4qpyXnDskOA71ejWC4lBdPCu2PMeVe6HqehytIideBEX6ETOCpw0Ogf AgMpS9DZJjoAiDjbdBRS7s12mR24uum9iVmAUqxm+ukH8JooyfRnnEO/9ZIAqFbcWATJ zGqdmDouPYQMXthCuE3F+1AzQkkJYaV1mqkYii5LL2UrW3rIn/1SpK9T6yhVz84jFXmw xMqatOORqLjw3nQeKhFcfu5nGkI7KCjfCi3oxcTGqgPx7PvmAOCOfKdk34XGnRccETH7 Yldw== X-Gm-Message-State: ANoB5pn0H/mc+oYAvUpzZFF6inpUTvdJNdJnCahKWNz92xguZfKjwHK7 9iIRwaANcFU8LcrbhpXvhVZpTeZsmb3Jkw== X-Google-Smtp-Source: AA0mqf5lCX6j2V92t8dvZ4JLA8WU0FbUMKNGVbuDIZvFOQ4I1QpJtvRsP0i7u86Zip9ncO3zqAL6mA== X-Received: by 2002:ac8:7615:0:b0:3a5:1be7:3603 with SMTP id t21-20020ac87615000000b003a51be73603mr49644722qtq.168.1669665659368; Mon, 28 Nov 2022 12:00:59 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1004]) by smtp.gmail.com with ESMTPSA id v2-20020ac873c2000000b003a57f822157sm7346084qtp.90.2022.11.28.12.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 12:00: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> Date: Mon, 28 Nov 2022 15:00:58 -0500 In-Reply-To: <87pmd7ceck.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 28 Nov 2022 16:01:47 +0100") Message-ID: <87sfi2svb9.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=1669665747; 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=GXm4QlejbQ7viDyTi/OclQr2cs7wHrpO0VxGuVNUkn0=; b=g7CTl0uSSBOx8nhNhRHE85ZmQSjvdZgGfXT/oQAxFfo6odppvLqQ6P0sfNXT+ST8Fz3Axf gb8t/oTVSklicG9zy8hb7uJJTuo8rJZuNZqzr4/r+GxHPCZrQJQRC254cr5m2Ru1Rgz/e1 qgvDJ9XP8XhMBh8+BqAkJby61e8E7O73Q+1yuXr0pzcpvDsGdrnd1DO5sSvwCsdj7OM4wj vyxQ2BT/c4ZRJVbjpD2fzvCPQmh+QuTrzepsG9LBQDIhAq6SKk8qz7ZtTGE5pGST1smw0J nQkrz6nuA/AO8+xPlRXlnggvFmEDWvizg0lIYRLFtHdeimh1TGndC1epU+9juw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669665747; a=rsa-sha256; cv=none; b=Wr3TcmC5Hyhj/H7PLNJxcgZ3MjpKCDSf6AfaJ4BT8Tr9cDUngY7n8GXKyTjhfIOcldmTJ8 DxryPceVl6/IWJ2VWkrlRCMh7G4ihNfuYXMWV5gFJ6TNs+3T/lDlRKFai+ATPF+GAzTscI k0CBXT9Ic2ypfrbDFutx/4KO64av+WuTP8mHP30yoD8bZ1SUlHVt6YDgLwjJv6Hz5hj6Lk PL2eYj1iJUmPQvvpNPgdoxfrLhwsahfqlDJIt6TqggPXN2SPJHtJrQ+6HivdbRlwxoZRxH z+Xwd5xrPlLw60xS4daK+YOUYag99oNCPEujwSG5rklmO07uPUjj2xmhEYuyew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JtoDxYiA; 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.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JtoDxYiA; 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: 2BD8FDD7F X-Spam-Score: 5.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: nMSxMZrlnvLJ Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >>>> The issue seems to be with the serialization of the >>>> object nested in the >>>> record. I tried this at the REPL: >>>> >>>> scheme@(guile-user)> ,m (gnu services mail) >>>> scheme@(gnu services mail)> (namespace-configuration (name "inbox")) >>>> $8 =3D #< name: "inbox" type: "private" >>>> separator: "" prefix: "" location: "" inbox?: #f hidden?: #f >>>> list?: #t subscriptions?: #t mailboxes: () %location: #f> >>>> scheme@(gnu services mail)> (serialize-configuration $8 namespace-conf= iguration-fields) >>>> name=3Dinbox >>>> type=3Dprivate >>>> separator=3D >>>> prefix=3D >>>> location=3D#f >>> >>> The location here should probably be empty rather than `#f' no? It looks >>> as though the value is coming from the internal %location, rather than >>> the user-provided location. > > Uh. > >>> I'll if I can find anything the macro, it looks quite complex to me :-). >> >> It's not only to you, if that helps. It's rather... intimidating ^^'. > > [...] > >> Ludovic, would you have an idea of where the %location field or its >> CONFIGURATION-location accessor come into play? > > 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 #'- name)= ))) > #'(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-loca= tion=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? It seems nowhere. Thus, we can simply rename it without impacting anything, right (except theoretical usages in the wild, since in the API). > With commit 44554e7133aa60e1b453436be1e80394189cabd9, the second one > is the =E2=80=9Cwrong=E2=80=9D one: =E2=80=98namespace-configuration-loca= tion=E2=80=99 now returns the > =E2=80=98%location=E2=80=99 field, not the user-specified =E2=80=98locati= on=E2=80=99 field. (I > reported that issue in .) > > What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9? No. If we revert something, it won't be that whole commit, but just the moving of the field in the define-configuration produced record. > After that we can work on renaming the =E2=80=98location=E2=80=99 field of > while preserving backward compatibility. Why do we have to massage the user facing record (namespace-configuration) instead of the underlying mechanics? The macro should serve us, not the other way around :-). See my idea to simply rename/remove that automatically produced "location" accessor which appears unused to me. Would that work? --=20 Thanks, Maxim