From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WBh5IFlvMGIwggEAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 11:50:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QBwIHllvMGKLUwEA9RJhRA (envelope-from ) for ; Tue, 15 Mar 2022 11:50:01 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C1D117061 for ; Tue, 15 Mar 2022 11:50:01 +0100 (CET) Received: from localhost ([::1]:57852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU4ka-0003IU-5r for larch@yhetil.org; Tue, 15 Mar 2022 06:50:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3pW-0002el-IP for guix-patches@gnu.org; Tue, 15 Mar 2022 05:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nU3pW-0007iT-93 for guix-patches@gnu.org; Tue, 15 Mar 2022 05:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nU3pW-0008Sl-41 for guix-patches@gnu.org; Tue, 15 Mar 2022 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54375] Mutable guix shell environments Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Mar 2022 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54375 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 54375@debbugs.gnu.org, Charles , Maxime Devos Received: via spool by 54375-submit@debbugs.gnu.org id=B54375.164733781132456 (code B ref 54375); Tue, 15 Mar 2022 09:51:02 +0000 Received: (at 54375) by debbugs.gnu.org; 15 Mar 2022 09:50:11 +0000 Received: from localhost ([127.0.0.1]:47589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3og-0008RQ-Ts for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:50:11 -0400 Received: from mail-io1-f50.google.com ([209.85.166.50]:43869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3of-0008R2-N4 for 54375@debbugs.gnu.org; Tue, 15 Mar 2022 05:50:10 -0400 Received: by mail-io1-f50.google.com with SMTP id r11so21446282ioh.10 for <54375@debbugs.gnu.org>; Tue, 15 Mar 2022 02:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GYILHExVn95v3hY5uHV/mYou5ySoLpKiXjIW+yN7aN4=; b=md0Ocrl+5VVAzFhy2fyUzRdZBeGBIITgWcAzzeXtemmMU6dcOh1qWST4+VktM5pH3R Cg+jBISwhzUMnR+FO6CwU9jBJLyenxDQNyzC/I8Vu9UoU34mOBXcZ1s3m1Q4qYcsUA98 EArfssNavZUYd2vpzw43ECIhqMz4c5kLtyVFVn0wW0nLrLOCF2HcBEeYw4JhxCV+t4Ms XuhQFct2RcdeJVbSPCUorscV7a22wWCK0RioFc1U8fRGXTuYGge3/qjp2LJhWVvJMmIe 7N3cpuaU+KP1bnpKEajVA2fX81RhgtXSzHbNu3OAH+EaYpFKuzG5HG8Mp3YNWpiyQ+G3 Q2Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GYILHExVn95v3hY5uHV/mYou5ySoLpKiXjIW+yN7aN4=; b=v8NdIUVEuVT6ENNRoeRRtuPIWZLdpEiAnaFBxluevSeflNA8/s3BUHKVPoFOpZUG6c 9QQeW4BI1M0n3KH1XExYGf6REVM/pPO4IOCWzjbiNp9+cZ6spgVoEK+S6PK2xsmxB854 4SEcSGdMB875BEdXQdAd2Hvj8fMAYw+hefsWWaGCF/HEqEZGj4UQl9PoIuYyq01vwcrO 7mjzO6r3uJfU/bkDbsTXmeLj18BlvCJS80L7uzohtLbl7XAFLDGeIfveywYCmUcecW5P XEv5FQLAj+2nxyOar4pf7oPOeOESOUP2mWZc0HJzRpj/cA8SWBuVEHZ7CM9qstWyZx4p 2myw== X-Gm-Message-State: AOAM5335SmvE8g4nAJKHDbKF7Jick8amnFbQZRemTU1ko95665IqW5PA v1jc7F1y9hYcSz2EKEkMgJXjgqMibCZMBJbtx70= X-Google-Smtp-Source: ABdhPJzQI2cQbw4XjYpkNPL5p21o/9I/RhxE123BFzX/NZ60vbGXncEFNp2+2BvSLw2D+NmT1NP+ah0jFtWOLpr97bs= X-Received: by 2002:a05:6638:12c3:b0:319:9b70:5ad8 with SMTP id v3-20020a05663812c300b003199b705ad8mr22372105jas.132.1647337803861; Tue, 15 Mar 2022 02:50:03 -0700 (PDT) MIME-Version: 1.0 References: <6aaf3dfaa6c207b2968b756fa86806232227e2be.camel@telenet.be> <87pmmop490.fsf_-_@gnu.org> In-Reply-To: <87pmmop490.fsf_-_@gnu.org> From: zimoun Date: Tue, 15 Mar 2022 10:49:52 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: 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=1647341401; 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=GYILHExVn95v3hY5uHV/mYou5ySoLpKiXjIW+yN7aN4=; b=lN2+B/f5hJq5rhz3Tx7ohFKVvQQznxhKPA3PN67ZrWB3vJkXvnSrpgudBbPV5nhDeXqA3B 6kLyqe3KZa2UaiReqrUqfxH2ZPmiscUC6PLMEs+39jhuR07UuNJke88Xi1OE6sy5Kvvhgn fNQOtteGwja06GODiFqLTLFbVxjEKThntC33jjaSpJL400wq+mKwawnNFvF5IgDXOUzo8w DGMgkjjkB21TIs2zutm4msVq0P+YvPbiOXsyMYBd8ss/ez2Wx5LUykCcVuCkIK3jjxbOnN TmtNk/pMxFXYOmB03xF3Hjbe3lqBSGqzw/CPs152TqzrRHyWVwDIrhOr8ulHGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647341401; a=rsa-sha256; cv=none; b=ZYXFVlJf5HSZhCuzIA4n2svVmi68s2pMq1qGWFm/5bT4VeoEcVXTMt68Pv/vm4FL+bCMbh fU1BJ75uUsJ+VRiTUeF3nI58kI1xd1orUYCPwjaJwdhTVNZxW4Zisfi5IOfoNablF8csKt dCVjgEZdj0WOD41CadMZAINxD3nfH5P862TRQWulnjFg9tkT9CcezdZha+dsbePRIzK5Ti /pp+14SYkSo+w3eX5bEnMb868NNF6xqeEtIMwGgc6MH5agYDaKDXRP3pKH+0Vf92Vkkoac Ve4CcsGmqyFuN39G8PIBkIflEWIuiclHXmdsvvxbv1MTEyY1v5PY8g4B7AwDUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=md0Ocrl+; 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: 5.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=md0Ocrl+; 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: 2C1D117061 X-Spam-Score: 5.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: r7ay00uEDpBZ Hi, On Mon, 14 Mar 2022 at 23:19, Ludovic Court=C3=A8s wrote: > That command allows for an incremental style like Charles proposes: > > module load gcc # adds GCC to $PATH > module load libgc # adds libgc to $C_INCLUDE_PATH > module unload libgc # removes libgc from $C_INCLUDE_PATH > > For this to work though, =E2=80=98module=E2=80=99 is actually a shell fun= ction: that > lets it adjust environment variables here and now. While I understand the need of Charles's proposal, especially in development or exploration, I am convinced that this "incremental style" is the root of many unreproducible computational environments. The "incremental style" is a quick and dirty approach for creating a computational environment and because the discipline is wrong then it lead more than often to hard-to-reproduce computational environment, therefore Guix should not try to mimick, IMHO. I agree with Liliana's words: =C2=ABGuix is functional by design and we should not compromise on that.=C2=BB. To me, it is as programmers being strongly used to imperative style complaining about the paradigm shift of the functional style -- or vice-versa... I digress. :-) To mitigate because we have to work and sadly need to have things done... > One could do: > > $ guix shell a > [env]$ guix shell b > [env]$ guix shell c ..somehow, it would ease if when requiring the package 'b', the environment is "aware" of the search paths of the environment required by the package 'a'. For instance, --8<---------------cut here---------------start------------->8--- $ guix shell man-db [env]$ tree $MANPATH /gnu/store/m3i9pga6rqfg342sajzww4gl8w51q6sz-profile/share/man =E2=94=9C=E2=94=80=E2=94=80 index.db -> /gnu/store/pdh5nz4qkg5q243q5rgxkk1hnmaf1plq-manual-database/share/man/index= .db =E2=94=9C=E2=94=80=E2=94=80 it -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wnn2= mx-man-db-2.9.4/share/man/it =E2=94=9C=E2=94=80=E2=94=80 man1 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man1 =E2=94=9C=E2=94=80=E2=94=80 man5 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man5 =E2=94=94=E2=94=80=E2=94=80 man8 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man8 4 directories, 1 file [env]$ guix shell coreutils [env]$ tree $MANPATH /gnu/store/m3i9pga6rqfg342sajzww4gl8w51q6sz-profile/share/man =E2=94=9C=E2=94=80=E2=94=80 index.db -> /gnu/store/pdh5nz4qkg5q243q5rgxkk1hnmaf1plq-manual-database/share/man/index= .db =E2=94=9C=E2=94=80=E2=94=80 it -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wnn2= mx-man-db-2.9.4/share/man/it =E2=94=9C=E2=94=80=E2=94=80 man1 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man1 =E2=94=9C=E2=94=80=E2=94=80 man5 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man5 =E2=94=94=E2=94=80=E2=94=80 man8 -> /gnu/store/vg7g63qddkd8jxlhlm9j1wxxj8wn= n2mx-man-db-2.9.4/share/man/man8 --8<---------------cut here---------------end--------------->8--- Here, 'coreutils' is not "aware" of the parent 'man-db' and thus MANPATH does not contains the expected 114 files. --8<---------------cut here---------------start------------->8--- $ guix shell coreutils man-db [env]$ tree $MANPATH [...] 4 directories, 114 files --8<---------------cut here---------------end--------------->8--- Using an option, say '--transient', a new profile is created each time but what this new profile contains would depends of the parent profile. Last, the manipulation of a "temporary" profile is done via "guix shell" thus this "transient" profile should be manipulated via "guix shell" and not "guix package" (or aliases as "guix install"). However, what could appear still annoying is the stack of environment: guix shell a guix shell b guix shell c then remove the package 'a' from the environment requires to exit 2 environments and then re-create them. Need more thoughts. :-) Cheers, simon