From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 EMwiFbvqmGLsOgAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 18:52:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QKVCFLvqmGJhTgAAG6o9tA (envelope-from ) for ; Thu, 02 Jun 2022 18:52:11 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EAC933D20A for ; Thu, 2 Jun 2022 18:52:10 +0200 (CEST) Received: from localhost ([::1]:53268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwo3N-0004sm-QY for larch@yhetil.org; Thu, 02 Jun 2022 12:52:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwo3G-0004sd-MI for guix-patches@gnu.org; Thu, 02 Jun 2022 12:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwo3G-0001fC-Dp for guix-patches@gnu.org; Thu, 02 Jun 2022 12:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwo3G-00078w-8v for guix-patches@gnu.org; Thu, 02 Jun 2022 12:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jun 2022 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165418871027437 (code B ref 55653); Thu, 02 Jun 2022 16:52:02 +0000 Received: (at 55653) by debbugs.gnu.org; 2 Jun 2022 16:51:50 +0000 Received: from localhost ([127.0.0.1]:54512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwo33-00078T-NJ for submit@debbugs.gnu.org; Thu, 02 Jun 2022 12:51:49 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:41956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwo2z-00078D-AD for 55653@debbugs.gnu.org; Thu, 02 Jun 2022 12:51:48 -0400 Received: by mail-ed1-f68.google.com with SMTP id 25so6759380edw.8 for <55653@debbugs.gnu.org>; Thu, 02 Jun 2022 09:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=43q8kPflaZGWZc462T9ZBpoJfQ306LebxXny/qXsySU=; b=S9M7r2aOrtLmMfYsLzDnPl5sIqiol0f7IGv0s/zi59koNz+FT1yto/Xelf8XmZykO2 uNN8d2jH+58o9O2ll5T6zAOw9oyLVADKpJ9kmI13O2y1AH3p/ybqpiWZNVWpNSI1veKi RB7I4j2jLZ0pC0lN9H+AkC/jmHmakxUpG4/KPkg664SkOc+ogzUuxwMNor16twCM+1Kh cpIznLrtmX8KYt7xERcUP3h25Akt1WO/7+aSn5xqXouAcrq1QD4/nmcRZSn+lveDkbM5 U6w0MeVfScMoA6gUEY5/qYEGnaN8syUaA+/toh9u4tbIQJ9RPWKss2cYH71k05LRh5eB 8HRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=43q8kPflaZGWZc462T9ZBpoJfQ306LebxXny/qXsySU=; b=LgkCJz98mUI2vQ7d72zyMX4Ecq3VhldjNl604a6gb0f+ET+Nu/G8lam51hut+pnuKO 4mO41EMD/Xe27pISABVRidSLNiDdDN4gHy+10H3MHiQImxCtKbcmOuyAPbFjJxUgeehv coJnZE0Wi9DYfh/X5evJIsXKJdEHJa0gBC9yCHMad55FCDaVKS1C4fralLqPIPXpbnsa GLk6q+s+lL/LTk7s9flxA5vPUXWysuc1RF9cypRVtz80+1YEsiDBSjR6KeGJ8AAPgaok 3zIzoUeCPI5tN6x1bTQer7En/rbUtFjoCfj5bAwvd3f7cH3F6/6adlRMwL2HZGftaTRa R7xg== X-Gm-Message-State: AOAM530bd1vFhYy5FT62ba6/YnOuZxM1pP0xHVRStZV87xSRO/KvHCkY cCOwxn8JeqUfmwjeeJ9CZWo= X-Google-Smtp-Source: ABdhPJwb5QQmvGC2gX2UrnI0tpHUObuuP2jPIjkZYvhxLZkg/NLNx3ebiYKJtCTe9WxOJJqBFT5X1Q== X-Received: by 2002:a05:6402:289:b0:42d:cd82:be22 with SMTP id l9-20020a056402028900b0042dcd82be22mr6435864edv.373.1654188699403; Thu, 02 Jun 2022 09:51:39 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l21-20020a17090615d500b006feb479fcb4sm1901592ejd.44.2022.06.02.09.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 09:51:39 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Thu, 02 Jun 2022 18:51:38 +0200 In-Reply-To: <87sfonp4vr.fsf@gnu.org> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> <87sfonp4vr.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654188731; 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=43q8kPflaZGWZc462T9ZBpoJfQ306LebxXny/qXsySU=; b=IWPiDcNmwt+EXy9+Hvi6vSJedKmUxFOWIlPHkX5FZGTYQV7iUJJlyQXGxuyddfm/xvSwEn mXI+a2so850RhDTmYPobb635ZQKobLUllJSEgGPb5cJaIJr/5x60CM3oZwNlG/FvL1KTog wsKI0Jil6RuD1uEIj7L3KX594SfV2rx4J8pCyhuJj0Zm2HjQSHawvsxLJaD41XLUCf5FPa RNY73BsD4dF03xvvquLM8dDNsCyEOO3aJ2BGTOZ9as6qUp4xjgBNlIhx5OTrS0s6fhUAjw 6HqitMxSzz79SaqG8kWhVbVifchNkuHqkNH5Ofypzc1amxfN/cpxI6PPEBYk0Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654188731; a=rsa-sha256; cv=none; b=Cam6KFUK3JOWCGfo7624+b0eNMHBk/8hizm71vP29hZJSLJi6ojSQgZ0ZxKcEJr1mKJdhu xGXh49fqMxn6G+6TOIv2QEQdfj1uOAU/tOxeZSBqiwojMme+R3wuUqa0XUNSeUUq6LyhYG GTcf1lrHXaPF2g7SpYgpaRSimzbyvOeHcW8uTVOdBna+ZIINg9Q+Qj2978r/rTo7fxFmwr 8k0X4Hjie27J+l47rWIrefwISCKQcNPBoxppnpIdHYr3CVa78apHiRm/EyRdAtiiR91qMc HtcUDcH67gucHUGgmenDkMvZVLUh91sYsiuwEk2hJtlgm5mhhaL4hyKAGaN1fg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=S9M7r2aO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=S9M7r2aO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EAC933D20A X-Spam-Score: 7.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: ny7/0JmkwUjo Am Donnerstag, dem 02.06.2022 um 15:32 +0200 schrieb Ludovic Courtès: > Hallo! > > Liliana Marie Prikler skribis: > > > If it reads like that, then that's probably a mistake somewhere.  > > My actual proposal to allow both of the following: > > > > (package > >   other-fields ... > >   (manifest some-manifest)) > > (package > >   other-fields ... > >   (packages (list bash coreutils emacs ...))) > > Oh OK, I got it wrong, sorry. Actually, I too got it wrong in the patch description. The implementation and test should be fine though. > Still I’m not a fan of having syntax that looks like a field but is > not an actual field, if we can avoid it.  I prefer to expose the data > structure as it exists and, if needed, to build abstractions on top > of it. I can see where you're coming from, but IMHO the content field does not itself provide a useful abstraction, and changing the profile record + constructor would itself break ABI. Thus the syntactic sugar. > [...] > > My use case of naming profiles would be served by such a procedure, > > but using a syntactic constructor has other benefits in that all of > > the fields of the profile become accessible.  That means that users > > could (once profile management via Guix Home is implemented) for > > instance run less hooks or additional hooks for certain profiles, > > allow collisions, use relative symlinks, etc. for basically free, > > not to mention that changes which break record ABI (such as added > > fields) get promoted directly through syntax but not through a > > plain procedure. > > This is an argument (and probably a good one) in favor of using > records.  I don’t read it as an argument in favor of the > ‘packages’ pseudo field though? Indeed, my argument for the pseudo-field is mere readability. Compare the four semantically equivalent ways of writing a profile in the test case I added. Cheers