From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 06:12:26 2024 Received: (at submit) by debbugs.gnu.org; 22 May 2024 10:12:26 +0000 Received: from localhost ([127.0.0.1]:54975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9ixO-0000sN-4s for submit@debbugs.gnu.org; Wed, 22 May 2024 06:12:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:46388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9ixL-0000sH-K4 for submit@debbugs.gnu.org; Wed, 22 May 2024 06:12:24 -0400 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 1s9ixE-0006yX-1k for guix-patches@gnu.org; Wed, 22 May 2024 06:12:16 -0400 Received: from out-188.mta1.migadu.com ([2001:41d0:203:375::bc]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9ixB-00059K-NV for guix-patches@gnu.org; Wed, 22 May 2024 06:12:15 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716372727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=O1MEjCi3LEstVTNirFhQ4NresQiqH20U0OH5QOzEv68=; b=Rv31OLFeAL5e2I/YWbNIDS1D7WTDqJx7b4wK8yVh6HCYnMnzlu4/UpPhAk5/n9X59sGtpk JGkpd5uYuoYbADrW9L/idIwahw9KLr91/xs3UunpFHDjyfQp8hPXdlaydegInMEjIhFsmm 1qb4qWPSgmx0Ye8mufJItb9CPwxXpgtJPvTI/siOKoFGFPi6cQSjEMtj/xyauhWwMPXbMn 6zQuFFtpUw6TucZY4wJ/Jq8B3nDrS9XxN5wSBBn/sKa+cltMjtVovqktvKfwq3VVuMMhjA r2VPoSUlXp9qi/1tJmY6lxgT02hITWz8/UHVr2lzQ6srZRMlxNx+1kY9SoqohQ== X-Envelope-To: andrew@trop.in X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH 0/1] services: home: Use pairs instead of lists. Date: Wed, 22 May 2024 14:02:26 +0400 Message-ID: MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::bc; envelope-from=andrew@trop.in; helo=out-188.mta1.migadu.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Richard Sent , =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Andrew Tropin 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.4 (--) After rewriting from car/cdr to match-lambda in v2 of this patch: https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.1711046203.git.richard@freakingpenguin.com/ the format changed from pairs to lists, I didn't noticed this nuance during review because the documentation still says that service should be configured and extended with pairs. Also, pairs are more apropriate data type here. And this match-lambda rewrite will break downstream RDE user's setups after migrating to upstreamed version of service. That's why I propose to go back to pairs. Andrew Tropin (1): services: home: Use pairs instead of lists. doc/guix.texi | 4 ++-- gnu/services/guix.scm | 2 +- gnu/tests/guix.scm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) base-commit: b06a460bf5236a9d52f936f2023451051b3e622a -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 07:07:16 2024 Received: (at submit) by debbugs.gnu.org; 22 May 2024 11:07:16 +0000 Received: from localhost ([127.0.0.1]:55220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9joS-00049f-DM for submit@debbugs.gnu.org; Wed, 22 May 2024 07:07:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:33112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9joN-00049Z-Ii for submit@debbugs.gnu.org; Wed, 22 May 2024 07:07:14 -0400 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 1s9joG-00008j-Fj for guix-patches@gnu.org; Wed, 22 May 2024 07:07:05 -0400 Received: from out-186.mta1.migadu.com ([95.215.58.186]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9joD-0005pk-D5; Wed, 22 May 2024 07:07:04 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716376018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eJUqc2R5p0f9iTQIdaIpzq69N9wZoZ9IMQfb6rBfhn0=; b=Ayqr3t5cc+1K6eCh5hGxodYR70s3IkGW24DSE5yzpVIa0fYrsZ/Q5Vi1fCv01UmmgtTeej fWO1xky6w6MAXMkgKe9rLiRXzf7xedo0YeEo/9psymiZr4EXQabiT8xcjHRxaT+qgfGDvj 4At2k1PNTcmfsQ3Wce5s6PG1fcWzJzY33zKWuiL0c2C4rv2qalvsabRTTk9sPmX5M/v7My 8ab+87zKoVKTL0BxnEEuh/+XjVzQi6ui5zIxQEjyuZHKGLbkzmmk27UJGT8sAOI500pl8M NKCy/z8PbHfarO8bMm2Lpk5nD40ESZvJbZowofx440VN5lcPKDsYHysGmhSg/A== X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH 1/1] services: home: Use pairs instead of lists. In-Reply-To: References: Date: Wed, 22 May 2024 15:06:55 +0400 Message-ID: <878r02f6ls.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.186; envelope-from=andrew@trop.in; helo=out-186.mta1.migadu.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Richard Sent , Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s?= 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.4 (--) * gnu/services/guix.scm: Use pairs instead of lists. * doc/guix.texi: Update accordingly. * gnu/tests/guix.scm: Update accordingly. Change-Id: I0b8d3fa5b214add89bdb84a11fa20d1b319435f0 --- doc/guix.texi | 4 ++-- gnu/services/guix.scm | 2 +- gnu/tests/guix.scm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8073e3f6d4..8cc5edc805 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -39576,7 +39576,7 @@ Guix Services (operating-system (services (append (list (service guix-home-service-type - `(("alice" ,my-home)))) + `(("alice" . ,my-home)))) %base-services))) @end lisp @@ -39585,7 +39585,7 @@ Guix Services @lisp (simple-service 'my-extra-home home-service-type - `(("bob" ,my-extra-home)))) + `(("bob" . ,my-extra-home)))) @end lisp @end defvar diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index 96f5ecaac0..1f0e2a310d 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -696,7 +696,7 @@ (define guix-data-service-type (define (guix-home-shepherd-service config) (map (match-lambda - ((user he) + ((user . he) (shepherd-service (documentation "Activate Guix Home.") (requirement '(user-processes)) diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm index 12ad1bf255..6071cb018e 100644 --- a/gnu/tests/guix.scm +++ b/gnu/tests/guix.scm @@ -271,7 +271,7 @@ (define %guix-home-service-he (define %guix-home-service-os (simple-operating-system (service guix-home-service-type - `(("alice" ,%guix-home-service-he))))) + `(("alice" . ,%guix-home-service-he))))) (define (run-guix-home-service-test) (define os -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 17:34:26 2024 Received: (at submit) by debbugs.gnu.org; 22 May 2024 21:34:26 +0000 Received: from localhost ([127.0.0.1]:58018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9tbO-000265-6X for submit@debbugs.gnu.org; Wed, 22 May 2024 17:34:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:39588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9tbL-00025y-DN for submit@debbugs.gnu.org; Wed, 22 May 2024 17:34:24 -0400 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 1s9tbF-0008Tp-0M for guix-patches@gnu.org; Wed, 22 May 2024 17:34:17 -0400 Received: from mail-108-mta209.mxroute.com ([136.175.108.209]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9tbB-0003eV-OF for guix-patches@gnu.org; Wed, 22 May 2024 17:34:16 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta209.mxroute.com (ZoneMTA) with ESMTPSA id 18fa239c481000efce.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 22 May 2024 21:34:05 +0000 X-Zone-Loop: 594ae3bda56efa0c552bc261234475dc996dbcd126a0 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To: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=EPtdgRQbh12ZdVf1X7KyS3PjEG5oJmGNBGWuPXSM9jU=; b=E3/9WjAZ5nN2pqid73ptdrF9N8 nJa9ziGYT1RhrGsTeQypNF88agwTCK63XHuF+5lhUzHu/y6AQHBL9rsZXsT1Rh4xVKK3CYXguPz+O Sp6HdMEs0FnLLs/nGrXUnNwsYVixOUAt9kImh3E2o1REWCYWSkTzaeZyd88amNXlBobFLb3XmV31g 531SZYkpAyE9Xl1YUOpv/8gG/zAdiobANEuweHn6V0mjXq6u8j7eVYAzanhK1kB8peM1VsU4mA4I0 3sVJan6PAZgwWrTD5H6kcpZ4sOqwU9ydlQq09Eh8UWarTkmtUbZuVF9cIqrdP2C3vKYXuw5QAwJg1 miIRxuYg==; From: Richard Sent To: Andrew Tropin Subject: Re: [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: (Andrew Tropin's message of "Wed, 22 May 2024 14:02:26 +0400") References: Date: Wed, 22 May 2024 17:33:57 -0400 Message-ID: <87cypdwmyi.fsf@freakingpenguin.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.209; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta209.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-patches@gnu.org 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.4 (--) Andrew Tropin writes: > After rewriting from car/cdr to match-lambda in v2 of this patch: > https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.= 1711046203.git.richard@freakingpenguin.com/ > > the format changed from pairs to lists, I didn't noticed this nuance > during review because the documentation still says that service should > be configured and extended with pairs. Also, pairs are more > apropriate data type here. And this match-lambda rewrite will break > downstream RDE user's setups after migrating to upstreamed version of > service. > > That's why I propose to go back to pairs. > I'm not opposed to going back to cons cell pairs. I didn't put too much thought in a "list of two elements" vs. "cons cell" besides the match statement being easier to handle with a list. Would this patch have unintended side effects? I thought the . in match conditions had a different behavior. --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (match '(1 2 3 4) ((a . b) b)) $5 =3D (2 3 4) scheme@(guile-user)> (match '(1 2) ((a . b) b)) $6 =3D (2) scheme@(guile-user)> (match '(1 . 2) ((a . b) b)) $7 =3D 2 --8<---------------cut here---------------end--------------->8--- So changing to this would allow for a home-service entry like the following to match: --8<---------------cut here---------------start------------->8--- (simple-service 'my-extra-home home-service-type `(("bob" "bill" "bertha" "billyanne" ,my-extra-home ,my-hom= e-2))) --8<---------------cut here---------------end--------------->8--- >From my testing, this /will/ error (yay), but not as soon as the match would with the current code. Instead of being caught before being passed to the daemon, it seems to be caught while lowering the invalid file-append object. Personally I would prefer to catch as many errors as possible before beginning to pass code off to the daemon where possible. Generally speaking it feels like pre-daemon errors are easier to mentally parse. In fairness, the current code also isn't trying particularly hard to check that "user" is a string and "he" is a home-environment or printing a fancy error message. Perhaps this would work? --8<---------------cut here---------------start------------->8--- (define-module (gnu services guix) ... #:use-module (gnu home)) ... (define (guix-home-shepherd-service config) (map (match-lambda (((? string? user) . (? home-environment? he)) (shepherd-service ... )) (e (error "Invalid value for guix-home-shepherd-service: " e))) config)) --8<---------------cut here---------------end--------------->8--- Maybe I'm just being silly. =F0=9F=99=82 --=20 Take it easy, Richard Sent Making my computer weirder one commit at a time. From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 23:38:53 2024 Received: (at 71111) by debbugs.gnu.org; 23 May 2024 03:38:53 +0000 Received: from localhost ([127.0.0.1]:58318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9zI5-0005Oz-GA for submit@debbugs.gnu.org; Wed, 22 May 2024 23:38:53 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81]:50758 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9zI1-0005Og-3r for 71111@debbugs.gnu.org; Wed, 22 May 2024 23:38:51 -0400 Received: from m (unknown [107.174.64.25]) by APP-03 (Coremail) with SMTP id rQCowADn7ZEuuk5mHtO7DA--.45670S2; Thu, 23 May 2024 11:38:30 +0800 (CST) From: Zheng Junjie To: Andrew Tropin via Guix-patches via Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: (Andrew Tropin via Guix-patches via's message of "Wed, 22 May 2024 14:02:26 +0400") References: User-Agent: mu4e 1.12.4; emacs 30.0.50 Date: Thu, 23 May 2024 11:38:15 +0800 Message-ID: <87sey9rye0.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: rQCowADn7ZEuuk5mHtO7DA--.45670S2 X-Coremail-Antispam: 1UD129KBjvdXoW7JF17JF47JF4DJr4DGr45Jrb_yoWDArX_Wr s5Jr1DW3WDX3WkWayrXw1fXr90k3yUJ345Xry8Kr1fZ34xt395ur4vg34Dua43JFWrJFyU Ars2qrWSkFy7WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbVxYjsxI4VWkKwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4 vEx4A2jsIEc7CjxVAFwI0_GcCE3s1lnx0Ee4C267I2x7xF54xIwI0E7I0Y6sxI4wAS0I0E 0xvYzxvE52x082IY62kv0487M2AExVA0xI801c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I 80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCj c4AY6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r 1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CE b7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0x vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAI cVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa 73UjIFyTuYvjxUheOJDUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71111 Cc: 71111@debbugs.gnu.org, Maxim Cournoyer , Richard Sent , Florian Pelz , Andrew Tropin , Ludovic =?utf-8?Q?Court=C3=A8s?= , Matthew Trzcinski 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: -1.0 (-) --=-=-= Content-Type: text/plain Andrew Tropin via Guix-patches via writes: > After rewriting from car/cdr to match-lambda in v2 of this patch: > https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.1711046203.git.richard@freakingpenguin.com/ > > the format changed from pairs to lists, I didn't noticed this nuance > during review because the documentation still says that service should > be configured and extended with pairs. Also, pairs are more > apropriate data type here. And this match-lambda rewrite will break > downstream RDE user's setups after migrating to upstreamed version of > service. > > That's why I propose to go back to pairs. Maybe we can support pairs and list of length two at same time? > > Andrew Tropin (1): > services: home: Use pairs instead of lists. > > doc/guix.texi | 4 ++-- > gnu/services/guix.scm | 2 +- > gnu/tests/guix.scm | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > > base-commit: b06a460bf5236a9d52f936f2023451051b3e622a --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmZOuicACgkQO1qpk+Gi 3/AlDQ/+OnphQ185KNByjj4Qah07Eyi/khK7+iJopOtZ8TGgiOyTp3VoxFFn7H9v fxM9XLqmG63juqlmJo25ZkW50AeFGpCPe+FCObIWh5J632OeFovVe4m+yJHIt/QL DYir92kEqdpN5cgwhN2pYQODWLmS0iyPh9BWuOBn8OV7UENpBY5h/eWbdEnYvalx KTOgJdP2aRXBqrqdH6eoCatAcXQt3lhsa3j2zVaNTjl97ZsJWT8bjchWYO+9JBo5 4DAPQ+fXlVIDXU1CQvJt5lzPiY8fUN+FYYyTCs3yz8sycyJ7yBFzSCaPYtQ/Q6XF BVSv2sFLGjU/oX8ZGbfr32lWD4j93XpOWritDCxCUfYKp8pcJ2WZfeZkEK55aw3E ua8OP2rgPpfpC5dR//7WcvdQFnCPPcWH8BSKKwDJ38MWjVpXdXXKMW0NEd4T+3RK Bg0bndGcZ3UCYpWbzwu54WidkM6cAEpJIns50iXqEJYeEnZEF7DpwKQ6zc8WceBZ WOgKEFEVE9DU1LfI755A0P0JLbggTm8TjKB0UOihcOWogNIfrTarhYaiXzj4SZFX SdWeFpU517fXZy1Nq3cQNqcM5sscGCOPigcBrm6OSPloJX+tQs+4msEdR9NSOlTx y0eKb3jpV9VKtGpP+qnw6uU+csUyIDf/3sqDItX1OaSjGVVxUAM= =Q4nC -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 01:44:14 2024 Received: (at submit) by debbugs.gnu.org; 23 May 2024 05:44:14 +0000 Received: from localhost ([127.0.0.1]:58455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1FN-0006rM-E1 for submit@debbugs.gnu.org; Thu, 23 May 2024 01:44:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:37638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1FJ-0006rG-JM for submit@debbugs.gnu.org; Thu, 23 May 2024 01:44:12 -0400 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 1sA1FC-00046A-Vu for guix-patches@gnu.org; Thu, 23 May 2024 01:44:03 -0400 Received: from out-176.mta1.migadu.com ([95.215.58.176]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1F6-00067I-Ft for guix-patches@gnu.org; Thu, 23 May 2024 01:44:02 -0400 X-Envelope-To: zhengjunjie@iscas.ac.cn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716443032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QjJIXAIc3+/Ppsb3sn+LiZIuyEnGvmjJkOHRpBaw9gc=; b=fZSk9/6lNT+d/DNwbgROS7dhc2tka9C1SR22CvfBOf5yY92afAkLvxWzScDVpud27FLcdz 0eMlqv5lswKBiQjHHGnrAoC4HrdvyBl3XL/q1BOk4iAW+7g+NusIFrrWTDpBaxwE/oSL+R fupnSpMrulU5FAJFnd8c72KBHUjWEdmazzcVE4J1XFRWO0fGIV5d+moTEBg4rNEVfdaQXx ggEH3nLYIIvyjbP4ytx9sAoduxnp27y3fFsn2xqHb5S0mD6vJGqSR8sLgo6C9UcA5itUHN V5qj7/Jr2BB9YfTBl7FkKh7DN+SycqX4LAEQrMC216WUwkQu/9TBwcjT3598nQ== X-Envelope-To: guix-patches@gnu.org X-Envelope-To: 71111@debbugs.gnu.org X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Envelope-To: pelzflorian@pelzflorian.de X-Envelope-To: matt@excalamus.com X-Envelope-To: maxim.cournoyer@gmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Zheng Junjie , Andrew Tropin via Guix-patches via Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: <87sey9rye0.fsf@iscas.ac.cn> References: <87sey9rye0.fsf@iscas.ac.cn> Date: Thu, 23 May 2024 09:43:47 +0400 Message-ID: <877cfl13sc.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.176; envelope-from=andrew@trop.in; helo=out-176.mta1.migadu.com 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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 71111@debbugs.gnu.org, Maxim Cournoyer , Richard Sent , Florian Pelz , Ludovic =?utf-8?Q?Court=C3=A8s?= , Matthew Trzcinski 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.4 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2024-05-23 11:38, Zheng Junjie wrote: > Andrew Tropin via Guix-patches via writes: > >> After rewriting from car/cdr to match-lambda in v2 of this patch: >> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e= .1711046203.git.richard@freakingpenguin.com/ >> >> the format changed from pairs to lists, I didn't noticed this nuance >> during review because the documentation still says that service should >> be configured and extended with pairs. Also, pairs are more >> apropriate data type here. And this match-lambda rewrite will break >> downstream RDE user's setups after migrating to upstreamed version of >> service. >> >> That's why I propose to go back to pairs. > > Maybe we can support pairs and list of length two at same time? Thank you for the idea, however I think ambiguity is a bad practice, from my early experience with guix it's more confusing rather than helpful. I still don't know why profile-service-type accepts list of lists rather than alist (list of pairs). > >> >> Andrew Tropin (1): >> services: home: Use pairs instead of lists. >> >> doc/guix.texi | 4 ++-- >> gnu/services/guix.scm | 2 +- >> gnu/tests/guix.scm | 2 +- >> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> >> base-commit: b06a460bf5236a9d52f936f2023451051b3e622a =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZO15MACgkQIgjSCVjB 3rAq8Q//Y0vo3tShXCOsgPB75ylEGhYMEUlF18+L2noFVYcMI1BR2hclw2LJ9+T7 2eDd7wdN3dWCnhDYZf3KTVDlg6/w84MBAj4MUrvJWcK96lcEYwCKxN7+jspYmVMC j6sxt4n5/dU2NkMwKuyQv+8ysmOj/TYX+EkbV8YrpA1JVWp0c0d2ad/URbfbyEOq uloe1JZh2VBDXrpbYUiIQeG/YU6DAwgXdmS/Ja0REkV7AhkJ5a30l7GVnuwcOv0+ j0/LjpLkMej9F7lISTJ1uBbIqF66gCPqrsYLjuZjNOHANQwvuBtQimGkRmKxOwfn wOVzCXV1/VmtUb4HIPdiXJw2QivWAPBvGOksYgi8LA0BuiCXGfBoSuMLYkEKmHjQ 62d4uYY7S2jAl53K8P/HA+p9zS5uDSybk8VjWr7PGRH/nNgmqykoiCLTYUFGCHmp Jf0w/Gvz7C304FObHlLT+7gcSdc07yv1sgeJy7mcd9piUO67+tl20N3m6KZGianV MXWo+cm3Eli/S/ZnKjgCZAlAcNCzjSt0A2XhgWzh7RGJMkzjyarEL9bm6YeJLyY3 tAR7B39c6XpBRwbxhvfHNn4jmqpaRoQh8LTsW0jtIDUYPtQ4cbSOX0RLf+7VNbNF jWJ6QV5TmKw2taQoYiC9Edl9SunS8o1vaWAQMdvJlbu/3rYfi/0= =jLbC -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 01:45:26 2024 Received: (at submit) by debbugs.gnu.org; 23 May 2024 05:45:27 +0000 Received: from localhost ([127.0.0.1]:58461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1GY-0006sa-GC for submit@debbugs.gnu.org; Thu, 23 May 2024 01:45:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:42096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1GX-0006sU-CC for submit@debbugs.gnu.org; Thu, 23 May 2024 01:45:25 -0400 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 1sA1GM-0004M3-Jf for guix-patches@gnu.org; Thu, 23 May 2024 01:45:15 -0400 Received: from out-172.mta0.migadu.com ([2001:41d0:1004:224b::ac]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1GI-0006Gl-UE for guix-patches@gnu.org; Thu, 23 May 2024 01:45:14 -0400 X-Envelope-To: richard@freakingpenguin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716443107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aQs2plujTD/a7JyhJMUduTHG7rP6fv8YcsHI+Wxnejw=; b=dnotslVDiu1FTNMv9E9tCOD9AHMUKpEL6gSsfhFtHBKr4Yk6taJtMgkhbsRGX2UwpKTN2/ Ul9wyYjFv2p1hP1CWlYIq6RRDhsqISBIcwlwBlsOkpGXKwCbHJK/ADYOHmMPBcwZvl3Oby E4jET6wPAD05/GJG/1utOTu3W/PPd6B0iXCBV0QE6ADRr9UoospC4qITY6pRYYxO7Xpxoj yo69TuMDu+c+BrrinJO8bZLIgHG/RG+3tKyPUDo5gA6wiNn216LOJy9OhYf2CzKaXY4PnB hfiYdDWhdeluGB3Kk/+lg0e3AwrWZH6o/lJgREgaLUDzV8FYHHXaK0i4k5RXEg== X-Envelope-To: guix-patches@gnu.org X-Envelope-To: ludo@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Richard Sent Subject: Re: [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: <87cypdwmyi.fsf@freakingpenguin.com> References: <87cypdwmyi.fsf@freakingpenguin.com> Date: Thu, 23 May 2024 09:45:02 +0400 Message-ID: <874jap13q9.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::ac; envelope-from=andrew@trop.in; helo=out-172.mta0.migadu.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-patches@gnu.org 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.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2024-05-22 17:33, Richard Sent wrote: > Andrew Tropin writes: > >> After rewriting from car/cdr to match-lambda in v2 of this patch: >> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e= .1711046203.git.richard@freakingpenguin.com/ >> >> the format changed from pairs to lists, I didn't noticed this nuance >> during review because the documentation still says that service should >> be configured and extended with pairs. Also, pairs are more >> apropriate data type here. And this match-lambda rewrite will break >> downstream RDE user's setups after migrating to upstreamed version of >> service. >> >> That's why I propose to go back to pairs. >> > > I'm not opposed to going back to cons cell pairs. I didn't put too much > thought in a "list of two elements" vs. "cons cell" besides the match > statement being easier to handle with a list. > > Would this patch have unintended side effects? I thought the . in match > conditions had a different behavior. > > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user)> (match '(1 2 3 4) > ((a . b) b)) > $5 =3D (2 3 4) > scheme@(guile-user)> (match '(1 2) > ((a . b) b)) > $6 =3D (2) > scheme@(guile-user)> (match '(1 . 2) > ((a . b) b)) > $7 =3D 2 > --8<---------------cut here---------------end--------------->8--- > > So changing to this would allow for a home-service entry like the > following to match: > > --8<---------------cut here---------------start------------->8--- > (simple-service 'my-extra-home home-service-type > `(("bob" "bill" "bertha" "billyanne" ,my-extra-home ,my-h= ome-2))) > --8<---------------cut here---------------end--------------->8--- > > From my testing, this /will/ error (yay), but not as soon as the match > would with the current code. Instead of being caught before being passed > to the daemon, it seems to be caught while lowering the invalid > file-append object. > > Personally I would prefer to catch as many errors as possible before > beginning to pass code off to the daemon where possible. Generally > speaking it feels like pre-daemon errors are easier to mentally parse. > > In fairness, the current code also isn't trying particularly hard to > check that "user" is a string and "he" is a home-environment or printing > a fancy error message. > > Perhaps this would work? > > --8<---------------cut here---------------start------------->8--- > (define-module (gnu services guix) > ... > #:use-module (gnu home)) > ... > (define (guix-home-shepherd-service config) > (map (match-lambda > (((? string? user) . (? home-environment? he)) > (shepherd-service > ... > )) > (e (error "Invalid value for guix-home-shepherd-service: " e))) > config)) > --8<---------------cut here---------------end--------------->8--- This idea is good, I'll incorporate this into v2. > > Maybe I'm just being silly. =F0=9F=99=82 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZO194ACgkQIgjSCVjB 3rB5Hg//YInm4obk2a3gC1MigegfEoYJAxJmAdHO7523zmfyo12LB//knGFiGn6U VqPCtjbPEWLXVE+YpFm5AI5wOAe3a3oXSId07ozHdocEZoDgVFE8GZJD4hnmZ7te dRftmcckEKIntpNZzJQzub0tC2tmRvV6sd/3mVnhETcyf71YElWOsmHj3iQhD5CB POwxDKO+H4FgjE0fw949aS5C+SCDyV2WiFyUTJ2qanWyb3WASOf+rtQz7M+5SvN2 RXVCxO8nzY9nH293fOreeQp7AQtLkRu9wcdSOQIGrJhy1p00wc1HePYw/Q+3AEOq +3gwVZVafqK6XPjeYJxWMtq/SVx/6vjGg8ivZLgszO1f8I+XtZHcPcA89fP4FcMK fgemyhgs30eR6JgP+r7fPfSkOBoXbex9ieOV4i2So+Kwf+ncy2Tyztnqpra9NPqs 4j7ypIW2uts6aY+pQkn8t+0CBJ8s24xnM9y5h5wNn0cYXPlPIsK7+Gjn8xzzSU8L 5rQfFElWN2puQD/yg3jP7R7Esu0VNX1G5E3zaB2GPcW+gBLsGzlHHPH5zUbhbmWD id+f89nGGM1JJFSGtg69UjObGCmOe8N3Ze/q1ceNl31GZXu54pJazntSaJYm9m8m lvgftrK69cFf3Zk3Ij1v3nNP1f2kVoIjCjJ+RiJCy3Mb+mU2xoY= =ujiz -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 01:55:52 2024 Received: (at submit) by debbugs.gnu.org; 23 May 2024 05:55:52 +0000 Received: from localhost ([127.0.0.1]:58468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1Qd-0006wv-QU for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:50834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1QZ-0006wo-46 for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:50 -0400 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 1sA1QN-0000PG-8x for guix-patches@gnu.org; Thu, 23 May 2024 01:55:36 -0400 Received: from out-182.mta0.migadu.com ([2001:41d0:1004:224b::b6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1QL-0007lt-3Q for guix-patches@gnu.org; Thu, 23 May 2024 01:55:34 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716443730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5jib5nKdJO0NKqOYd/fK+vPp6yR45Ak1TcFu9cnLqIc=; b=UE2M6jATaRETmEPqlxL7iQi4H08QJ5FjlDXRCaegeOh4MoAu6Lsld+ZGbPfriua5HGACnh YpWeLgMxKzoLt8J2Hg1x+k76SK2vBp3jLe3aS/gUUJ+8LN/xBFS3SE5e7cNuEickSjhUAb iz0eJKbORCgMFUxhOYctHR7a4mDETxN6mVuTgjlukVDcWc5qWG09pejplbsfgyP+zVoeqO VJ39QZhUwGHZwcKaV7wXbAYn3Ow3xw8RuFz+/ibM1Qh2Zh8IlhV1RVXeJbsy8L5ZlPxURx 6mtYHRtb95wzGS+0iLm2YWHPX7imv/BA8Ru1FrmD9WUgWQhWaL9nHgXlUWM1oQ== X-Envelope-To: andrew@trop.in X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH v2 0/1] services: home: Use pairs instead of lists. Date: Thu, 23 May 2024 09:53:43 +0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::b6; envelope-from=andrew@trop.in; helo=out-182.mta0.migadu.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Andrew Tropin 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.4 (--) Use more precise pattern matching and signal error if it is not a pair of string/home-environment. Andrew Tropin (1): services: home: Use pairs instead of lists. doc/guix.texi | 4 ++-- gnu/services/guix.scm | 6 ++++-- gnu/tests/guix.scm | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) base-commit: b06a460bf5236a9d52f936f2023451051b3e622a -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 01:55:56 2024 Received: (at submit) by debbugs.gnu.org; 23 May 2024 05:55:56 +0000 Received: from localhost ([127.0.0.1]:58470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1Qi-0006x7-2u for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:35348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1Qb-0006wp-VP for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:52 -0400 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 1sA1QV-0000SS-AR for guix-patches@gnu.org; Thu, 23 May 2024 01:55:43 -0400 Received: from out-189.mta0.migadu.com ([2001:41d0:1004:224b::bd]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1QP-0007mF-9X; Thu, 23 May 2024 01:55:42 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716443735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZdDAIFYVkMq1LObxp7K1kyAQ6MlTtIaY5PWon6vJN0c=; b=PuLYc5I5HbIY0/m1r7ZC1aTeLzRHPmfJo/aqwuEwaKLRCZiVMhqeLFHuVwdlOxIRPqK04D 4sP94MSmOCWTLzye2Vyyldj2dsGLCRyJxdAmivXwil4BpchMlihZs5GGgoeAIfd6+m6r03 G7Stv8t48OCFABP49YUoKsjL4K1UzOYl7uhVtfc1dD/IXXkVrMSMP3H955cTzH2SQ9L+hk YZiQg6rsBVoi0GnHT6R6w+33pBN02x6i8HTrdOuZRB2wy9951et9UhU1He1FAKphQkB5LG +Y9JNWMP2DGwfcoznZ9QT8j+8YUy/B9YueExikUWnQvqJIkOikUW+BG/jHl1MA== X-Envelope-To: andrew@trop.in X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH v2 1/1] services: home: Use pairs instead of lists. Date: Thu, 23 May 2024 09:53:44 +0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Florian Pelz , Ludovic Courtès , Matthew Trzcinski , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::bd; envelope-from=andrew@trop.in; helo=out-189.mta0.migadu.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Richard Sent , =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Andrew Tropin 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.4 (--) * gnu/services/guix.scm: Use pairs instead of lists. * doc/guix.texi: Update accordingly. * gnu/tests/guix.scm: Update accordingly. Change-Id: I0b8d3fa5b214add89bdb84a11fa20d1b319435f0 --- doc/guix.texi | 4 ++-- gnu/services/guix.scm | 6 ++++-- gnu/tests/guix.scm | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8073e3f6d4..8cc5edc805 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -39576,7 +39576,7 @@ Guix Services (operating-system (services (append (list (service guix-home-service-type - `(("alice" ,my-home)))) + `(("alice" . ,my-home)))) %base-services))) @end lisp @@ -39585,7 +39585,7 @@ Guix Services @lisp (simple-service 'my-extra-home home-service-type - `(("bob" ,my-extra-home)))) + `(("bob" . ,my-extra-home)))) @end lisp @end defvar diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index 96f5ecaac0..3818749baa 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -696,7 +696,7 @@ (define guix-data-service-type (define (guix-home-shepherd-service config) (map (match-lambda - ((user he) + (((? string? user) . (? home-environment? he)) (shepherd-service (documentation "Activate Guix Home.") (requirement '(user-processes)) @@ -710,7 +710,9 @@ (define (guix-home-shepherd-service config) (list (string-append "HOME=" (passwd:dir (getpw #$user))) "GUIX_SYSTEM_IS_RUNNING_HOME_ACTIVATE=t") #:group (group:name (getgrgid (passwd:gid (getpw #$user)))))) - (stop #~(make-kill-destructor))))) + (stop #~(make-kill-destructor)))) + (e (error "Invalid value for guix-home, it should be in a form of +(\"user-name\" . home-environment), but the following value is provided:\n" e))) config)) (define guix-home-service-type diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm index 12ad1bf255..6071cb018e 100644 --- a/gnu/tests/guix.scm +++ b/gnu/tests/guix.scm @@ -271,7 +271,7 @@ (define %guix-home-service-he (define %guix-home-service-os (simple-operating-system (service guix-home-service-type - `(("alice" ,%guix-home-service-he))))) + `(("alice" . ,%guix-home-service-he))))) (define (run-guix-home-service-test) (define os -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 05:16:58 2024 Received: (at 71111) by debbugs.gnu.org; 23 May 2024 09:16:58 +0000 Received: from localhost ([127.0.0.1]:58764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA4ZG-0000PR-0Z for submit@debbugs.gnu.org; Thu, 23 May 2024 05:16:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA4ZD-0000PL-Ji for 71111@debbugs.gnu.org; Thu, 23 May 2024 05:16:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA4Z0-0003Z0-Lf; Thu, 23 May 2024 05:16:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=2X4XRUkBvbZM7kfO5NdtHQReaFDKKlangcZwIHleoKg=; b=TAowy+XWb4RiWDgomut0 4+NC6TT+A3EyCCLtyQ8xm0rGVgNBpYynh0P82l4K/NN6C7lqKXw1nBKlNR5q5RcD1m4Js1zuVndxP q/1vFzfdHMnG2Xrs9sx3PYB4MDoKGU2QXr9pcbBV0Y6EM6VvewaNWvSCLiOlPJHR+R2JtUdy+OP6w 8u6bkK0GZDY4d10D0NXff0JZq7vixLSFlXbwfx0OTLMRPR9ticTWUz06EInlmxZJlR0W9J80sXT0P 0mukZpGnMeq+L/fC6ayWQFSpcSgkmZZjpwhXiazRNOFrYCdqB4AxTa9JHHycrJSZnRtXULDDig6es Vl3iAX2UvKPMDQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: [bug#71111] [PATCH v2 1/1] services: home: Use pairs instead of lists. In-Reply-To: (Andrew Tropin's message of "Thu, 23 May 2024 09:53:44 +0400") References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 Prairial an 232 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du Canard X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 23 May 2024 11:16:39 +0200 Message-ID: <87h6eoc2h4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71111 Cc: Richard Sent , Maxim Cournoyer , 71111@debbugs.gnu.org, Florian Pelz , Matthew Trzcinski 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: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > (operating-system > (services (append (list (service guix-home-service-type > - `(("alice" ,my-home)))) > + `(("alice" . ,my-home)))) What=E2=80=99s the rationale for this? In general I think we should avoid gratuitous incompatible changes. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 09:07:14 2024 Received: (at 71111) by debbugs.gnu.org; 23 May 2024 13:07:14 +0000 Received: from localhost ([127.0.0.1]:59037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8A5-0002S8-O1 for submit@debbugs.gnu.org; Thu, 23 May 2024 09:07:14 -0400 Received: from out-186.mta0.migadu.com ([91.218.175.186]:50714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8A0-0002Rx-DV for 71111@debbugs.gnu.org; Thu, 23 May 2024 09:07:12 -0400 X-Envelope-To: ludo@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716469615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xc5NpudcsT9HJit1uClTg8aEE/fEoaFxA7rW/j7rYT4=; b=BGRs/RxTSJ3Ixu8cDn0rj4pIvFej6nWLDVOXjzNkVk8j59X/+kre7/EOB0bV9PD72IRUjL ygpSFxyIy7Tjd0Y6RD4Y1uNumzYPOO7uXgsZ65tzv6waPqZ/1UjABNYKnuEe/1HwNiJN4I AhUSWfKco8eXWuuyooMqXe3FFnzfJ9M9f19TIeFneuULc4X7MO+zSOMplMazbKadZHnCA1 SvBLhBEkyRDFVERkoGDXy5EVtUPuYJsPXuDIfpwGtf4Rc2P7xkhqBsAuePzSrixTeJWV+T I7yM+qMdIRJFyQ4ict8vRQkYP3RGd83jPsidlH96Re86nFxf85+/VZeBT5dK8w== X-Envelope-To: 71111@debbugs.gnu.org X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: pelzflorian@pelzflorian.de X-Envelope-To: matt@excalamus.com X-Envelope-To: maxim.cournoyer@gmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#71111] [PATCH v2 1/1] services: home: Use pairs instead of lists. In-Reply-To: <87h6eoc2h4.fsf@gnu.org> References: <87h6eoc2h4.fsf@gnu.org> Date: Thu, 23 May 2024 17:06:48 +0400 Message-ID: <87pltc65jr.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71111 Cc: Richard Sent , Maxim Cournoyer , 71111@debbugs.gnu.org, Florian Pelz , Matthew Trzcinski 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2024-05-23 11:16, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> (operating-system >> (services (append (list (service guix-home-service-type >> - `(("alice" ,my-home)))) >> + `(("alice" . ,my-home)))) > > What=E2=80=99s the rationale for this? =2D-8<---------------cut here---------------start------------->8--- After rewriting from car/cdr to match-lambda in v2 of this patch: https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.17= 11046203.git.richard@freakingpenguin.com/ the format changed from pairs to lists, I didn't noticed this nuance during review because the documentation still says that service should be configured and extended with pairs. Also, pairs are more apropriate data type here. And this match-lambda rewrite will break downstream RDE user's setups after migrating to upstreamed version of service. That's why I propose to go back to pairs. =2D-8<---------------cut here---------------end--------------->8--- > > In general I think we should avoid gratuitous incompatible changes. Agree. This API is very young, so I think it make sense to update it in this particular case, considering rationale above. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZPP2kACgkQIgjSCVjB 3rA69g//YmEbGvo+X+g+Wh5Y7HEbe43cz8YjpAJDbR43B1Fzzcsfq7+VrR8Nxbu6 gbJlY304kFPVmLeERrvTWDirIw6uJ9X8/zBwyES0nR88or2w2XnJLEhylp+4nb5E Z7QvYr1Zk/CnsQfyACdqAFnDfBTVMAN93R3zv4+YPGWbD0nCFNtB4uk2qVmJbPg6 n8+XapLDrBdTD7Dd+jsZgwyXRbm9GAdHlw0MoYCmaZOpuFralMpiywQajN2Wez4d H3VqYjTsuLr4xkj9nUdJ4vMauHTFK04YVztdHgQfXw7rdGiGdockeWwu9bLXfV3v jubu+hVxs8ckeryVL3ZJFq/aDfBbMuveFnmF9WpZTAg/KuMm0dcY1oYcEXoXBuiA w5AA1J52eBEupQDoo7KEsfd6hMZ6lPD2k81ygZ999D2PDXaM4VQ0gJjE0IqZibDQ FITqlTG3Z+z2dUNVA7k6JvDI/2sjByfVRc4ZlhQm7UahPKDrT2OHcnaNdTtyTaJQ lkpKQEK6n0dZ7TBoiMgAcTI49blmejKW+N7iw+56JAoIkN6o9PwgPfgzQjLAXubG BlPEaoNmIh0tzCZGRrjjH9zhbplBp6kvuR1L3ZxNwl1p5uTDnsmxDEr1g59fAAZO EWu5VNWre6jY5z4DZt0BS8SVT6ReIYQVw+8h0vsAIS+36iknPAE= =n9tj -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 12:03:19 2024 Received: (at submit) by debbugs.gnu.org; 23 May 2024 16:03:19 +0000 Received: from localhost ([127.0.0.1]:59719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAAuU-0004Ji-Ki for submit@debbugs.gnu.org; Thu, 23 May 2024 12:03:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:41954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAAuO-0004JK-N7 for submit@debbugs.gnu.org; Thu, 23 May 2024 12:03:15 -0400 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 1sAAu2-0004YP-Bk for guix-patches@gnu.org; Thu, 23 May 2024 12:02:52 -0400 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAAu0-00089g-KS; Thu, 23 May 2024 12:02:50 -0400 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-43df7f42ac9so12577051cf.2; Thu, 23 May 2024 09:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716480164; x=1717084964; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=rrxT3nhVKccPK3VcogwaXvEWK75ZMLFcwmfIWtQnt74=; b=KEp6m3eJ3rsbD1rIKq28AjuEqlp12oKhVfdjJsNJ4mQULdXSwWd13JcJ3CVsEC/iNq HeUxqsqV0XpB9FTjEYXh3Rz5AL/ISduhp6owS2iwSevZ/BgdtfQuJArH/LSezTkU1TN4 g1CDKRMzch+5P90CL38OsmhEtRF+xht3Z0AANQ8iUE5j1YOIJbenYFt3ULmERX5vYztL zD/iAaqxk1pYHlPqNGUqVWP3noYaIfPcho7hS9Azt9m+my4nZzBO72+2IGr77sYOszgN hxYn67BcDUrk4Z0f6TXJI//Ym4i9pHtqaiQdtJlr1j+6gXf57+VzXE/0VoQ4PGQ3vLpL oBmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480164; x=1717084964; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rrxT3nhVKccPK3VcogwaXvEWK75ZMLFcwmfIWtQnt74=; b=TttDEOjsw8UhFaHPOl7QRzMrVR1xuNCQx1Dy3R7yimFlDCG79p3ekyQTy5DbpungDF B6H6Exln+O8QszSFIZogzx7SABBnmGQk5aP8+sU/U/isWFurNu8nE/LobNuLoMR/N+6x 2Ko5+WwmfPzvegRDLk3ue8DFJUQbtH37x2SN4L9NgAEFq2CSIyKGBFDwzO7mZih0KCOe 3WeF5QSmqJmj4BTXmnyeBXOh5cPlYIbpNypkF4OlokV3sJQLZARoNZ4Hj/VGKbyU+4YT GEtHRDsCzinZkT/f5I7DwV9R/nPNattGl4xlKDOHa3LXCN5zLOVFu48LaBaFDe21RT+S CewA== X-Forwarded-Encrypted: i=1; AJvYcCXiqRoEn1BB4xNd01pslBUfPDO4fi6sT3yJHpa1MDQ8nSp4vC7CGslGVCwl5bMKUioftCJ8ZauQARtIihd/32sGDC0i/LY+fRZ9W9KGIyqfMoEk X-Gm-Message-State: AOJu0YxmMyqHN9bZVFc4HwbKVTUdEkhbu6zxnr/1Cwo/z8UBi3KdpWgy fPFaeGv5fMrJW8/ko7mLM+e5fSfsd3UHsGN84KrPMffuRrdCvWG/f81WeEpdWMI= X-Google-Smtp-Source: AGHT+IE3++uYIN+sv0+hnZj1w0OWzuKmtDzb/UmMYObX7dJidmfsHNgxXtJxF3TLp52aXp4qbLD9TQ== X-Received: by 2002:ac8:5fc7:0:b0:43a:cfc5:f0a6 with SMTP id d75a77b69052e-43f9e08b90emr52994041cf.13.1716480164524; Thu, 23 May 2024 09:02:44 -0700 (PDT) Received: from hurd (dsl-159-14.b2b2c.ca. [66.158.159.14]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43e16c5485fsm146537791cf.2.2024.05.23.09.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:02:43 -0700 (PDT) From: Maxim Cournoyer To: Andrew Tropin Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: <877cfl13sc.fsf@trop.in> (Andrew Tropin's message of "Thu, 23 May 2024 09:43:47 +0400") References: <87sey9rye0.fsf@iscas.ac.cn> <877cfl13sc.fsf@trop.in> Date: Thu, 23 May 2024 12:02:42 -0400 Message-ID: <874jaojz31.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 71111@debbugs.gnu.org, Richard Sent , Zheng Junjie , Florian Pelz , Matthew Trzcinski , Ludovic =?utf-8?Q?Court=C3=A8s?= , Andrew Tropin via Guix-patches via 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.3 (--) Hi, Andrew Tropin writes: > On 2024-05-23 11:38, Zheng Junjie wrote: > >> Andrew Tropin via Guix-patches via writes: >> >>> After rewriting from car/cdr to match-lambda in v2 of this patch: >>> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.1711046203.git.richard@freakingpenguin.com/ >>> >>> the format changed from pairs to lists, I didn't noticed this nuance >>> during review because the documentation still says that service should >>> be configured and extended with pairs. Also, pairs are more >>> apropriate data type here. And this match-lambda rewrite will break >>> downstream RDE user's setups after migrating to upstreamed version of >>> service. >>> >>> That's why I propose to go back to pairs. >> >> Maybe we can support pairs and list of length two at same time? > > Thank you for the idea, however I think ambiguity is a bad practice, > from my early experience with guix it's more confusing rather than > helpful. I agree. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 05:51:13 2024 Received: (at submit) by debbugs.gnu.org; 2 Jun 2024 09:51:13 +0000 Received: from localhost ([127.0.0.1]:57868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDhrs-0001KB-Mb for submit@debbugs.gnu.org; Sun, 02 Jun 2024 05:51:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:49820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDhrq-0001Jr-3S for submit@debbugs.gnu.org; Sun, 02 Jun 2024 05:51:11 -0400 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 1sDhrd-0001Hy-KZ for guix-patches@gnu.org; Sun, 02 Jun 2024 05:50:57 -0400 Received: from out-179.mta0.migadu.com ([91.218.175.179]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDhra-0007p4-OA for guix-patches@gnu.org; Sun, 02 Jun 2024 05:50:57 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1717321850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QZhpamrGM4AwlGiMIisjkDRvscFUFB4YQPFGzAHbaGQ=; b=RdH4HbO8VHnmgXGqfaFaUnYvkdq7YpDTvnjCK6VONrCEH5+D3+YJ/t/hhz7JxN9UB1vPtQ HVcbVgc4FLpK5onQXkVVBUtFvqoXMmQJUm/FOIySciAHhoIbmHynvueDTKcoSTX9shA+SX kT6rZLp+1JXedJ9aCWEygIwJ7x2TmU6OQSBRn2cDRmGrmW+p/xnHAcX82XL5ablV64baQU 6L3ET6P0CDr6XXv1J8at46bpCjv9q47r+uGKJ5yHwzvbWxYQnaS0HLkb/bFaGRzGghTEwC pDGIPPRnfUuRaknBjzmTS0/dp7G6wKu9wFVA2h/ODR9XXZf6FJ3NDTJROUm3ow== X-Envelope-To: 71111-done@debbugs.gnu.org X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Envelope-To: pelzflorian@pelzflorian.de X-Envelope-To: ludo@gnu.org X-Envelope-To: matt@excalamus.com X-Envelope-To: maxim.cournoyer@gmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Andrew Tropin via Guix-patches via , 71111-done@debbugs.gnu.org Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: References: Date: Sun, 02 Jun 2024 13:50:44 +0400 Message-ID: <87ttib1xmz.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.179; envelope-from=andrew@trop.in; helo=out-179.mta0.migadu.com 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=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Richard Sent , Maxim Cournoyer , Ludovic =?utf-8?Q?Court=C3=A8s?= , Matthew Trzcinski , Florian Pelz 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.4 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2024-05-22 14:02, Andrew Tropin via Guix-patches via wrote: > After rewriting from car/cdr to match-lambda in v2 of this patch: > https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e.= 1711046203.git.richard@freakingpenguin.com/ > > the format changed from pairs to lists, I didn't noticed this nuance > during review because the documentation still says that service should > be configured and extended with pairs. Also, pairs are more > apropriate data type here. And this match-lambda rewrite will break > downstream RDE user's setups after migrating to upstreamed version of > service. > > That's why I propose to go back to pairs. > > Andrew Tropin (1): > services: home: Use pairs instead of lists. > > doc/guix.texi | 4 ++-- > gnu/services/guix.scm | 2 +- > gnu/tests/guix.scm | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > > base-commit: b06a460bf5236a9d52f936f2023451051b3e622a Merged v2 with updated API and additional type checks. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZcQHQACgkQIgjSCVjB 3rDn/xAAhFOYGJlwoGSaVfDexvszA9dIZx9MXxipUJmv/tVwTfxZxkz+4HNGi8Mb 3O9XqJgJfQt5McnqDdQNTDtdgAp1Tml5TeCL2edWiQbqCj4zSZQuodKmOMC2MzJw w/fYnIUp/oB91Q3jx5wtRmVnLyGmx76HwcIDHkgU9r8xlNDhSCJNivu2kLSCc8bP yAqm4ewKxbZlm9SD3T5ZOQp6yFlNqVZDDhQ1lZpmkmoioMoJtZ1mt9zR+cXpoUZO ySy+7DTTEh6H1aBrKSuxuTAzofEMLmI6yjtFC6ZtuHZrD0ZuA+9LDCfXieGPkEMD RYgPNxhM1uoif7Sp805j8vImqQk9HwxGjdqaF386vdcOTyNqrOA53Mett0IxUNCu /BiBD1cwkM8vyT5/mC+0d1WHBWNRjOHrnXU/KvCI8RymESxaAFaIfzuJZzBREJ/R AQWUGTKV44lBGTyPOJlqKZRdAyAAQ0VgC1GhnjCexXGLKj+y3zkY3sobZIKpPZ25 T99OwHZX6X/hZh27dpJFjQoXu+RdupEBM+3EkRpEaAaP3l3A7NMtCgUUwG0GocGl OOGxE+PRWFDIaKAaTaTedc2ywgzsBp/zYqe9SKQBQ0bkIVgFbcbehmuw/YKsk1XT RbflDrhftdBJhqrYmzvPlqgjK7SE8wSYtYqjhSVDAwYf6sZIkb8= =PlU9 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 06:16:17 2024 Received: (at 71111) by debbugs.gnu.org; 2 Jun 2024 10:16:17 +0000 Received: from localhost ([127.0.0.1]:57899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDiG9-0001wk-41 for submit@debbugs.gnu.org; Sun, 02 Jun 2024 06:16:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDiG6-0001wU-0K for 71111@debbugs.gnu.org; Sun, 02 Jun 2024 06:16:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDiFm-0003Bu-4F; Sun, 02 Jun 2024 06:15:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=rjKiaQfPS5jycaJ5U1J6P88VUevK2gTlebYZOi6VUf4=; b=T/rSZ7U9uweqkgVfBgjZ RUOkUn7rlkHxagtJ8c3C3FMByEAF2gbVMK5nbYjgUBOMru5Sgl6HlgLmng12YbWEM8S/dXuGP9dxG 9gtGtlkFt5Dli09LdPMGz87j8hZJLGsw+1ZCWVXwkYeCmkO4MME5X6Avou9iqUgHFzA7hq4BtrFdY MbbiDBxCA2pbY3PDD3hP9k+Dd7YaNqhrjzlPvgZsKdsYB30F7KXDA5NRdAdc/7doSzU0qZtOtrwTK X5Sc5HFCLoxMxnbCW2kxON9eIolOayXX5zqArzYYb1OHAY1YxFpzZxIQPpE6eHKd+w2TNop4Oz7zq EpBu38Ch3yZ3+A==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: <87ttib1xmz.fsf@trop.in> (Andrew Tropin's message of "Sun, 02 Jun 2024 13:50:44 +0400") References: <87ttib1xmz.fsf@trop.in> Date: Sun, 02 Jun 2024 12:15:14 +0200 Message-ID: <87ikyrlkgd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71111 Cc: Richard Sent , 71111@debbugs.gnu.org, Matthew Trzcinski , Maxim Cournoyer , Florian Pelz 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: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > On 2024-05-22 14:02, Andrew Tropin via Guix-patches via wrote: > >> After rewriting from car/cdr to match-lambda in v2 of this patch: >> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928e= .1711046203.git.richard@freakingpenguin.com/ >> >> the format changed from pairs to lists, I didn't noticed this nuance >> during review because the documentation still says that service should >> be configured and extended with pairs. Also, pairs are more >> apropriate data type here. And this match-lambda rewrite will break >> downstream RDE user's setups after migrating to upstreamed version of >> service. >> >> That's why I propose to go back to pairs. >> >> Andrew Tropin (1): >> services: home: Use pairs instead of lists. >> >> doc/guix.texi | 4 ++-- >> gnu/services/guix.scm | 2 +- >> gnu/tests/guix.scm | 2 +- >> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> >> base-commit: b06a460bf5236a9d52f936f2023451051b3e622a > > Merged v2 with updated API and additional type checks. Perhaps I wasn=E2=80=99t clear enough when asking for clarifications=C2=B9,= but I think this change shouldn=E2=80=99t happen: first because it=E2=80=99s an i= ncompatible change that will break user configs, and second because it=E2=80=99s inconsistent with other similar interfaces (such as =E2=80=98authorized-key= s=E2=80=99 and ). For these reasons, I=E2=80=99m in favor of reverting this change. What do others think? Aside, it=E2=80=99s unfortunate that you weren=E2=80=99t around to review t= his patch initially, despite being one of the recipients: . I think it=E2=80=99s important to not= give the impression that you chime in just when an rde incompatibility comes up. Thanks, Ludo=E2=80=99. =C2=B9 https://issues.guix.gnu.org/71111#8 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 06:38:57 2024 Received: (at 71111) by debbugs.gnu.org; 2 Jun 2024 10:38:57 +0000 Received: from localhost ([127.0.0.1]:57927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDic4-0002XE-WF for submit@debbugs.gnu.org; Sun, 02 Jun 2024 06:38:57 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:50289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDic2-0002X0-Fx for 71111@debbugs.gnu.org; Sun, 02 Jun 2024 06:38:55 -0400 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-354cd8da8b9so3278432f8f.0 for <71111@debbugs.gnu.org>; Sun, 02 Jun 2024 03:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717324656; x=1717929456; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=GHKCdNTeg8zMcyYz2B/fZ/e0qFWAmKybb4dwMhhi+r4=; b=dKE2GSyu7pGKLLWKbz3RB5AZCpUvlFfQhXa59m/il1y70nL/n9E60zDYna7KFVXiPd 0cHlEEOGcIUb2jtf/cRuuB/tGv794B/fo7miyau6EpWjdmSAIxolqDWPfJHCM6O3EFAb 9uVm534zVFSachJdEaD3JsQKnRjMhKMYMTfqJ3W0ZN+CSd03nDqEY0slWqJWdlkR1HDu mGhucJxnzQeVsBYdF2D4+VzM0qnaeKeOw77pSwoLEtU2OllZ3OUgYWQyNcxQgWb9Ikd8 w20UI+9ilVlCzL5PM+dKyOxv4PCkiiNCMm+qzyhArjNiNLR6daODznFkCgxZZioSIKyu J+6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717324656; x=1717929456; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GHKCdNTeg8zMcyYz2B/fZ/e0qFWAmKybb4dwMhhi+r4=; b=N6iuaDDTFyYo/OIBZHwDWjN/hH+E4gNTqwU6gHjyZ1U5OSSy2aZmpitZm/MTOt6RcM ENFIXtjH3gkbH1mXz38zLu3AMvT5trB78AZjuRcoAZ7IhxxyzWCCoRk2O61JE3Wn2g5l V5qN9/JjoJn+fICG7wE6kQIlfha1XvR1ju/2oB7qDITFK0B2Jg4nG+hVYFZUi7ud/GHV o738v0zFs6IsGjpUAw5RBE164dl7IUHTLDae0bRzb4XNLNFDFmXUmixkRUyuL1WWQZfL iykgVEBMBmSQNhEGy4ohkNphTE+PUP3l4Bm29Qm7I4kcFOz3iktd1C3wpz+zkhm47voU 8fBQ== X-Forwarded-Encrypted: i=1; AJvYcCX4b1NRW5ycc/Xj8byib1o8wQVCd3k7fQpYtw+u1+p888z/zxOH29ac5YIvVETbF6OxegGIDi+TcLo/KaUKHoGeC/QAvz0= X-Gm-Message-State: AOJu0YxmbWZX+7Hi+9pKwHppDRVq1CIyJAWYl4fhqAcUMFwHk/A4UpoM psbvPHPJRr3q3KFnyH44pSxzEmbatopLk4x3GudPXluJiWICmami X-Google-Smtp-Source: AGHT+IGrkIHoRA9NBZJbja84sj5narg2madPO5fZxsjAKORacX3eerAEpfBwmsAS6epSpkuSHOO/bg== X-Received: by 2002:adf:ed43:0:b0:351:d338:d9e9 with SMTP id ffacd0b85a97d-35e0f30b2c7mr4736404f8f.48.1717324656118; Sun, 02 Jun 2024 03:37:36 -0700 (PDT) Received: from localhost ([141.226.15.89]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f1fsm5836505f8f.15.2024.06.02.03.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 03:37:35 -0700 (PDT) Date: Sun, 2 Jun 2024 13:37:34 +0300 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , Andrew Tropin , Richard Sent , 71111@debbugs.gnu.org, Matthew Trzcinski , Maxim Cournoyer , Florian Pelz References: <87ttib1xmz.fsf@trop.in> <87ikyrlkgd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ku3u4cXKen+4nqzD" Content-Disposition: inline In-Reply-To: <87ikyrlkgd.fsf@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71111 Cc: 71111@debbugs.gnu.org, Maxim Cournoyer , Richard Sent , Florian Pelz , Andrew Tropin , Matthew Trzcinski 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: -0.7 (/) --Ku3u4cXKen+4nqzD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 02, 2024 at 12:15:14PM +0200, Ludovic Court=C3=A8s wrote: > Hi Andrew, >=20 > Andrew Tropin skribis: >=20 > > On 2024-05-22 14:02, Andrew Tropin via Guix-patches via wrote: > > > >> After rewriting from car/cdr to match-lambda in v2 of this patch: > >> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe92= 8e.1711046203.git.richard@freakingpenguin.com/ > >> > >> the format changed from pairs to lists, I didn't noticed this nuance > >> during review because the documentation still says that service should > >> be configured and extended with pairs. Also, pairs are more > >> apropriate data type here. And this match-lambda rewrite will break > >> downstream RDE user's setups after migrating to upstreamed version of > >> service. > >> > >> That's why I propose to go back to pairs. > >> > >> Andrew Tropin (1): > >> services: home: Use pairs instead of lists. > >> > >> doc/guix.texi | 4 ++-- > >> gnu/services/guix.scm | 2 +- > >> gnu/tests/guix.scm | 2 +- > >> 3 files changed, 4 insertions(+), 4 deletions(-) > >> > >> > >> base-commit: b06a460bf5236a9d52f936f2023451051b3e622a > > > > Merged v2 with updated API and additional type checks. >=20 > Perhaps I wasn=E2=80=99t clear enough when asking for clarifications=C2= =B9, but I > think this change shouldn=E2=80=99t happen: first because it=E2=80=99s an= incompatible > change that will break user configs, and second because it=E2=80=99s > inconsistent with other similar interfaces (such as =E2=80=98authorized-k= eys=E2=80=99 > and ). >=20 > For these reasons, I=E2=80=99m in favor of reverting this change. >=20 > What do others think? This patch also added home-environment? without adding an import of (gnu home). It's unfortunate that the wording for the manual says 'pair' when it's a list, but IMO that's more of a typo in the manual than a mistake in the code. With a quick look I didn't see in any of my OS configs configurations with pair notations, even with simple-service or extra-special-file, where it would have been most likely. I think it would be best to roll this back. > Aside, it=E2=80=99s unfortunate that you weren=E2=80=99t around to review= this patch > initially, despite being one of the recipients: > . I think it=E2=80=99s important to n= ot give > the impression that you chime in just when an rde incompatibility comes > up. >=20 > Thanks, > Ludo=E2=80=99. >=20 > =C2=B9 https://issues.guix.gnu.org/71111#8 >=20 >=20 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Ku3u4cXKen+4nqzD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmZcS2oACgkQQarn3Mo9 g1EJYg//R5YFdIHEINWk6msWDDNBxoGnC+mLmTPxkYYmM2mfEh2z1cFsTLVnmHny O4FBC4A8qVTa1f2M/9HLzdn3EEzQEueLwQlo39ZrJpraJcpgr5IE5Cbyr45+cMiP 5ekfNesdxe4epdNJisJlFJ8YCt++bodKDxQh5XiQpN7LXz+lVxZAkRAfxUqrwF7O OR3GS+XXN4NcRLsfwnP3IpogybklzulN+nkb8AyFpIvkqNME9hiLHJZ8dyC5yd3T UZI73xFGlzhyQsN0oHj6NscLhzUD2RUQRTlfcoVbeYTUhZgs/L2cH7cZnaUFZf8Z 3wdRR/uegSe1il7iaYoWumL1U3n83lV7o4qIWC0pyvlrY1w8lQ5g8d6PucvRf8Wa LlKf78415FEDsO7Ym6r/jmG0Llz/zqRBBdKEn0kVsxVTOVy3/yy1c2L4xkk6Pimv 9NQfX+IiTq4N6SQGKTFM6vMTvPbMlGr3/ZJBVOVwpMWsQh33XhfGjw6iXBXWi99o phBbeJXFKId/7XK1hQVw1EahaoWqdT+T7iueYeABJGnER17OMwhrvdc9gS7ysDQW idOtx9JuGHZYh/QQIqHFIi5MeZKYvMCDBqruB04l4bLJku4bip/bC38pdChj/5s2 1KIvDPwMQl3JGUVLeHqjUfMHa+dtroNKcEBspyh1Hi/PvU3Zuh8= =ERny -----END PGP SIGNATURE----- --Ku3u4cXKen+4nqzD-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 06:58:25 2024 Received: (at 71111) by debbugs.gnu.org; 2 Jun 2024 10:58:25 +0000 Received: from localhost ([127.0.0.1]:57942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDiuv-00033H-Cx for submit@debbugs.gnu.org; Sun, 02 Jun 2024 06:58:25 -0400 Received: from out-184.mta0.migadu.com ([91.218.175.184]:51940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDiut-000332-7K for 71111@debbugs.gnu.org; Sun, 02 Jun 2024 06:58:23 -0400 X-Envelope-To: ludo@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1717325854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gQamn4HwUoRT3ZO/FqNfZC/1pYxDxuzHFZ8OfVcKSWY=; b=TNfH8WfRgMTc4cjCFO/fz/42BgX+DPTNm5Uci1zDCwqY1UskpHkCHT07D8VQJip6ryR9yP HoYfPTXMxIvG2A0TzQOpuTqMCpYCZ5L/rw6mNdRGeNGUxIGZd9boIsw9gUm6ewhr+enbhK WvsOP5FqH8MR/buASTqSlxRwIimO8fXmn9EMxY30ul1wkZ7CZnQZ4bjHlv9AhGzakx+9Ul nbS6SNLSlnt+bRggdq0PkbKv2AgaZZaVhQNJAMGon+Fk86kJWc60Dlm/Na/mIAhsyGQSVb 545bSaJE7EvrihBQK0mEWxgA23q7vVEjmm9ygjH8Rg6E/HnthxONy5/j+SIN+A== X-Envelope-To: 71111@debbugs.gnu.org X-Envelope-To: 71111@debbugs.gnu.org X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: maxim.cournoyer@gmail.com X-Envelope-To: matt@excalamus.com X-Envelope-To: pelzflorian@pelzflorian.de X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: <87ikyrlkgd.fsf@gnu.org> References: <87ttib1xmz.fsf@trop.in> <87ikyrlkgd.fsf@gnu.org> Date: Sun, 02 Jun 2024 14:57:28 +0400 Message-ID: <871q5f1ujr.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71111 Cc: Richard Sent , 71111@debbugs.gnu.org, Matthew Trzcinski , Maxim Cournoyer , Florian Pelz 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2024-06-02 12:15, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> On 2024-05-22 14:02, Andrew Tropin via Guix-patches via wrote: >> >>> After rewriting from car/cdr to match-lambda in v2 of this patch: >>> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe928= e.1711046203.git.richard@freakingpenguin.com/ >>> >>> the format changed from pairs to lists, I didn't noticed this nuance >>> during review because the documentation still says that service should >>> be configured and extended with pairs. Also, pairs are more >>> apropriate data type here. And this match-lambda rewrite will break >>> downstream RDE user's setups after migrating to upstreamed version of >>> service. >>> >>> That's why I propose to go back to pairs. >>> >>> Andrew Tropin (1): >>> services: home: Use pairs instead of lists. >>> >>> doc/guix.texi | 4 ++-- >>> gnu/services/guix.scm | 2 +- >>> gnu/tests/guix.scm | 2 +- >>> 3 files changed, 4 insertions(+), 4 deletions(-) >>> >>> >>> base-commit: b06a460bf5236a9d52f936f2023451051b3e622a >> >> Merged v2 with updated API and additional type checks. > > Perhaps I wasn=E2=80=99t clear enough when asking for clarifications=C2= =B9, but I > think this change shouldn=E2=80=99t happen: first because it=E2=80=99s an= incompatible > change that will break user configs, and second because it=E2=80=99s > inconsistent with other similar interfaces (such as =E2=80=98authorized-k= eys=E2=80=99 > and ). > > For these reasons, I=E2=80=99m in favor of reverting this change. > > What do others think? > > Aside, it=E2=80=99s unfortunate that you weren=E2=80=99t around to review= this patch > initially, despite being one of the recipients: > . We discussed the upstreaming of this service with Richard and I was following the thread above, so I was around. I didn't merge or comment on it because it is literally code written by me, so it make sense to let someone else to review and merge it. I didn't realise that in the second revision API was changed from pairs to lists, when destructuring was rewritten from car/cdr to match. I skimmed through the docs and was satisfyed and didn't wrote anything. It came up only now, when people started reporting problems. > I think it=E2=80=99s important to not give the impression that you chime= in > just when an rde incompatibility comes up. Not sure what you mean. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZcUBgACgkQIgjSCVjB 3rAV/w/+NyCz1opMXSYAnWjJvQwCdMoEkbn5LZ98NAxF8qPfBluA1wmoC8xpNNUE OZ3o9QUayi1cJITT0lPiKy/Jp7651BBlJ9enI8xghGPnYCxlpZKLcXS56ncnx9LY O+UbCkUzPVhpr0tEdiyoecn8Jgfo+cAJ8FKQSrXlK9zqY159qG6an4xJBUSogKVl QTOyF0G1dB6z56fQ8o+wI5rKHSOJu/VJuY3b4gp7DvB5EqatzKs2pxXbZPnRkx6p OJM56RdigcOQotZ3Sbp6ZyIDitMUDsFAgPiw1A2l49noI8exMBnSiNjOQATkoB7g wsEmrlqFpmuKQERwvOLPnholF1tdE0OA5I5CU3NKwnZaiCwjHWI3pDQQVJ3mkLoT DrzAwu+eQaFy8UHs1ga1kmnibFwVvy06zfjX9cuCMJwni/flJ6FQG3/g/JeqzDtU TQJfnJhOygyTH04lLbviedC6JSERsCPNHXfCxQ+0mInLeQNpzEsWf0e8o3gJYudl MgQktdv3K5+JktRlY4scHDbporPx4qG1UWJoGN2fncPPmJPoTx6GgENlPGVeKb4R 6kE1sMpxb5vuAO4V6w5KWr6mji9TfoAw9I41vk0sBA5cn2CkdOABbUH/Iv7dvoFc 1dQSZD13eICiFBy1eqJsa+6ku+Oma0ru7WUuGhxraitOv0u1ncY= =tTkx -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 07:13:18 2024 Received: (at 71111) by debbugs.gnu.org; 2 Jun 2024 11:13:19 +0000 Received: from localhost ([127.0.0.1]:57975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDj9J-0003Ry-SN for submit@debbugs.gnu.org; Sun, 02 Jun 2024 07:13:18 -0400 Received: from out-171.mta0.migadu.com ([91.218.175.171]:40809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDj9F-0003Ri-C1 for 71111@debbugs.gnu.org; Sun, 02 Jun 2024 07:13:17 -0400 X-Envelope-To: efraim@flashner.co.il DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1717326774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Vh1qnOLiHFezm7AGfZ0YxHXpBH5UNbgRbdea9msoZDA=; b=W77xjSSxrNk9Fcsn2dKxfzo6rpHQgKfH8LKoPxNdoMaIiAb/PBl/NF/ca8yWDo+avYahSj Df60wT5CQoNRMRPSAEJ8ioppPsLfUsUWKrEVgEMkAErq5kzUxG2DOfyqd0eoT7R1BDvpFl 90V48MsuYTorPW8QfAu4cYRfUid3koSjiVxi8OoP10DunGzEYH90lQDFpw5EjsDak9R/mB u7olc0yU+4YfwBYrGQ5TmRSynzzrfYMqIqwor/VvJT5zK3YaQxqUekuTVqi8i84w8Dz8y9 qZQsdepXqf+MiYy+Sv3eGk5sp08lsm4SM0WMyO/Irv4YHIya/MyRYPbc6RgX9Q== X-Envelope-To: ludo@gnu.org X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: 71111@debbugs.gnu.org X-Envelope-To: matt@excalamus.com X-Envelope-To: maxim.cournoyer@gmail.com X-Envelope-To: pelzflorian@pelzflorian.de X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Tropin To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8?= =?utf-8?Q?s?= Subject: Re: [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists. In-Reply-To: References: <87ttib1xmz.fsf@trop.in> <87ikyrlkgd.fsf@gnu.org> Date: Sun, 02 Jun 2024 15:12:49 +0400 Message-ID: <87y17nzjgu.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71111 Cc: Richard Sent , 71111@debbugs.gnu.org, Maxim Cournoyer , Matthew Trzcinski , Florian Pelz 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2024-06-02 13:37, Efraim Flashner wrote: > On Sun, Jun 02, 2024 at 12:15:14PM +0200, Ludovic Court=C3=A8s wrote: >> Hi Andrew, >>=20 >> Andrew Tropin skribis: >>=20 >> > On 2024-05-22 14:02, Andrew Tropin via Guix-patches via wrote: >> > >> >> After rewriting from car/cdr to match-lambda in v2 of this patch: >> >> https://yhetil.org/guix-patches/3394b0b51f6a5a608ebcfb7a63fdc34e52fe9= 28e.1711046203.git.richard@freakingpenguin.com/ >> >> >> >> the format changed from pairs to lists, I didn't noticed this nuance >> >> during review because the documentation still says that service should >> >> be configured and extended with pairs. Also, pairs are more >> >> apropriate data type here. And this match-lambda rewrite will break >> >> downstream RDE user's setups after migrating to upstreamed version of >> >> service. >> >> >> >> That's why I propose to go back to pairs. >> >> >> >> Andrew Tropin (1): >> >> services: home: Use pairs instead of lists. >> >> >> >> doc/guix.texi | 4 ++-- >> >> gnu/services/guix.scm | 2 +- >> >> gnu/tests/guix.scm | 2 +- >> >> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> >> >> >> >> base-commit: b06a460bf5236a9d52f936f2023451051b3e622a >> > >> > Merged v2 with updated API and additional type checks. >>=20 >> Perhaps I wasn=E2=80=99t clear enough when asking for clarifications=C2= =B9, but I >> think this change shouldn=E2=80=99t happen: first because it=E2=80=99s a= n incompatible >> change that will break user configs, and second because it=E2=80=99s >> inconsistent with other similar interfaces (such as =E2=80=98authorized-= keys=E2=80=99 >> and ). >>=20 >> For these reasons, I=E2=80=99m in favor of reverting this change. >>=20 >> What do others think? > > This patch also added home-environment? without adding an import of > (gnu home). > > It's unfortunate that the wording for the manual says 'pair' when it's a > list, but IMO that's more of a typo in the manual than a mistake in the > code. > > With a quick look I didn't see in any of my OS configs configurations > with pair notations, even with simple-service or extra-special-file, > where it would have been most likely. > > I think it would be best to roll this back. ok, reverted. > >> Aside, it=E2=80=99s unfortunate that you weren=E2=80=99t around to revie= w this patch >> initially, despite being one of the recipients: >> . I think it=E2=80=99s important to = not give >> the impression that you chime in just when an rde incompatibility comes >> up. >>=20 >> Thanks, >> Ludo=E2=80=99. >>=20 >> =C2=B9 https://issues.guix.gnu.org/71111#8 >>=20 >>=20 >>=20 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmZcU7EACgkQIgjSCVjB 3rDPyxAAhcfw528oP9X46rqdujoSoKAz3mEuAnL8j/J4o1Eg5ccBhWG4cak0Pe6h TlbnNlGAuwFuRGFZ0eEzFCzTOapwYEvgCcxphbIQCy3QgalhLz0S5JtJEap0GTod 3plsPHEnQ8vHWYRvCrKDEXSZFiNN6zAgnzIev3KG+MM9QnQwCi2TIKZOAq1cL7Nr D4ulhQ+YH0F6/lnRGaJw2v7ra5w0fxCtaOYVSEBVSwHDarpDpLv68oLDJvjD7LMo StE10HZ0dEVoPPJvKZcYRlOJ7tF5XEozY5bKbf+yzz/vaBxwt/Hox/4RNhG3NE1q VtBt5mRubRj0zr/dSa07rVuj6i8UYJzX9B98xpxPUDnGlPlc4iPoPvvq4o2f8cTS 5Uv4kxo5lRxugdXa5RpKHuCL+969UYz32IXYZoz+y29Tey7HzSP1QFrLDbfLnfUc fvEFZNok2Ndr9hnI5cgSoUHBO4723fMxO1lG3Uf0XqZJThgq6vrBuJ9YgD+U/J6q UPZgfILU1aiHvAYhUzCREy2IRSrAq+XJeL6Yo22hjqzswcl9Y6zFvomBMa7GoOc5 ct1VgdJtFg54iWTeovZPnH1PidOm/yw85cm7qhnIkp14+6BCupAGWfo6amSfRz4q PXzRYPhh1biI5Rf0fUR0TIhN3LZsMh0+jiOixIyL3yM4g00TgRA= =x0nJ -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 11:37:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Jun 2024 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator