From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 13 05:15:40 2022 Received: (at 60014) by debbugs.gnu.org; 13 Dec 2022 10:15:40 +0000 Received: from localhost ([127.0.0.1]:59449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p52K4-0002ol-53 for submit@debbugs.gnu.org; Tue, 13 Dec 2022 05:15:40 -0500 Received: from jpoiret.xyz ([206.189.101.64]:46732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p52K2-0002od-9I for 60014@debbugs.gnu.org; Tue, 13 Dec 2022 05:15:38 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 34A4B185315; Tue, 13 Dec 2022 10:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1670926535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QVQkQ1A5Q/lfiM6e7sn/W/kL2AcM9hKiqwV9d6R14vc=; b=wfrRPpWdKkxCtl/ZCOcoKA9RFZZsWtNrRcFYv10Ve2GFBxu1eiQ0NR2gP7GMjzTTyfaRTc Cio6R10p6OQSk8pwHr5ZpGy3Di7dMmR0+4ONaHyBIjb9qCyD0tpvWS3ZkXEDb7AXiS+ldl 2LNA1zobhjp7/aUMVeaZ5ro7OAa2VXdf/msqBo3kKryMYdVFk0hpvzEpmPXlvj2Mb8JzD8 CsuwVZRYjqIcLOtQV6e3FGZ5PNDxOLKK1ZGgtqa5ZmlHovznl3rPACUq3vyIGRcUera9lt 6x7fvcBUmCSytBIfXfsyTQlHS7nwD6MwoC6g4rBUJAHpHr0Ax0d45f9Uu9Scsw== From: Josselin Poiret To: mirai , 60014@debbugs.gnu.org Subject: Re: [bug#60014] [PATCH] activation: make install-special-file match against pairs as well. In-Reply-To: <7f00edbf-8b39-0d3e-4d29-0815176d143c@makinata.eu> References: <43e937e1625b47a80887e68847fb8a8811d3f39f.1670867103.git.mirai@makinata.eu> <87k02wfjk5.fsf@jpoiret.xyz> <7f00edbf-8b39-0d3e-4d29-0815176d143c@makinata.eu> Date: Tue, 13 Dec 2022 11:15:34 +0100 Message-ID: <87h6xzfw3d.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Bruno, mirai writes: > The documentation for it says: > --88--- > The value associated with special-files-service-type services must be a list of tuples where the [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 60014 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Bruno, mirai writes: > The documentation for it says: > --88--- > The value associated with special-files-service-type services must be a list of tuples where the [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.0 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi Bruno, mirai writes: > The documentation for it says: > --8<---------------cut here---------------start------------->8--- > The value associated with special-files-service-type services must be a l= ist of tuples where the first element is the =E2=80=9Cspecial file=E2=80=9D= and the second element is its target.=20 > --8<---------------cut here---------------end--------------->8--- > > Which I think is the natural way of doing it. (and communicates the inten= t, a pair with a path and a file-like object.) Right, that's unfortunate, although that could be changed to =E2=80=9Clist = of lists=E2=80=9D to make it clearer. > Of course, (list "path" file-like-obj) works as well but imo the pair is = clearer in purpose. > (what meaning would the third element and so on have, if ever present?) > This I found out the hard way by getting strange errors until I looked in= to what happens behind > `special-files-service-type' and realizing that only lists were accepted. > > The mixing of cases is unfortunate (it should have been pairs from the st= art) but preserves > compatibility with existing syntax.=20 I agree with you here, but then I think to avoid having to maintain both cases at the same time, all existing uses of special-files-service-type should also be modified, and only one kind should remain, with the other triggering some deprecation warning. You could match to `(path . file-like)`, and if (list? file-like), throw an exception. As a sidenote, the main problem is that Guile is not a statically typed language, but that's a whole other debate to have. In any case, I don't think this patch will be accepted as-is. I would only be partially in favor of the second solution (because it breaks existing code), while the first solution is low-effort and should work well enough. Up to you (and maintainers) to decide. Best, --=20 Josselin Poiret