From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 17:29:46 2021 Received: (at 50960) by debbugs.gnu.org; 4 Oct 2021 21:29:46 +0000 Received: from localhost ([127.0.0.1]:38493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXVWs-0003x7-0b for submit@debbugs.gnu.org; Mon, 04 Oct 2021 17:29:46 -0400 Received: from mail-vs1-f47.google.com ([209.85.217.47]:34484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXVWp-0003ws-3w for 50960@debbugs.gnu.org; Mon, 04 Oct 2021 17:29:44 -0400 Received: by mail-vs1-f47.google.com with SMTP id z22so19649737vsp.1 for <50960@debbugs.gnu.org>; Mon, 04 Oct 2021 14:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DwHSO+bymtbobYmaLx43qph2qUXiSs/2SInPAg4m6ks=; b=B1i5FaNPsaBQ9rMld0w4kIMuEGcOsNXOPWZhlGKFSdtuPpz0fFNa3235Fp0Q3cpboR 5TFU5qaw4/M3JP6a2vgQ4dEM4gkgqQo551KdjO5A1aByI5rOSJ83hVrYLTgfGVJs62Zt Vx0hxgO7bzoi0PjNtP4Zo5nKrzHWSFDp0a0WP3WKmpgKEzpa4A94fZCm79nCfEcvXU9l 4vAbuTuwfeHf9vyzQfBqEV6Hfs/NLrWWcUtiEY8h/bMu1nePOLDnqTKY0w0oEwjej4wk nKMW95YXPLdoXVXEBK3z6eoUqzG72zpms1QAfP86nMCMbxzRTVYSwaQAuV/UwDY5mxBY Qa4w== 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=DwHSO+bymtbobYmaLx43qph2qUXiSs/2SInPAg4m6ks=; b=Gg0Mee01sgmyguxEJFycmBv0hmZqIXYDEIaE0fM4TqQ5bU8tRgEdRu9f4vKYzakhw9 gOQFTYZV+nseV6ZqlY6D0R2r0yvxi/xiMWGp+6X7KCRBCiC5cnrJmO3Dv3yJNcaB8Ub+ Suztiy0zOfIsg05a0r+Rwng2oSuGnm4RHogM1zYJQpDZZ6r8SZgPPvO1mKq5hSsLygWq sDQBGddC+tfTqUOGe9qJ0ipucGZO+8ZmzYYjEHKgAZVtPzkHvk6uuOWc7FT2hNiVaxoL pRlypGYErl3SFPPwE/Ei8HoMOe6JirqqIFTZbBgh62Bp55ZRy95bcBiBGf7HbC1TN9gE lFug== X-Gm-Message-State: AOAM533wCHPgDZgZB7N9lmjXz8fpQL6P3hFWHQKY5ZJ3ik5naKNVws3v w80elnDDmKlU3b0hjNh9QyyY1Zc1Oo/Kgnbp0YhSIFXQOC2MAA== X-Google-Smtp-Source: ABdhPJzp+yn3hrBIu7fJq1MPFmKkTOJYSwzCz2YgRkuRSHVYSSEESG1RlBAL9VwK1PY8fJgWFy6ehR1KqpLNBzbQznM= X-Received: by 2002:a67:d00d:: with SMTP id r13mr15522083vsi.23.1633382977427; Mon, 04 Oct 2021 14:29:37 -0700 (PDT) MIME-Version: 1.0 References: <20211002102116.27726-1-ludo@gnu.org> In-Reply-To: <20211002102116.27726-1-ludo@gnu.org> From: "Thompson, David" Date: Mon, 4 Oct 2021 17:29:26 -0400 Message-ID: Subject: Re: [EXT] [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50960 Cc: 50960@debbugs.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: -1.0 (-) Hey Ludo, First of all: Thanks for picking up where I left off all those years ago. You remember mailing list posts I wrote 4 years ago much better than I do. ;) On Sat, Oct 2, 2021 at 6:22 AM Ludovic Court=C3=A8s wrote: > > Hello Guix! > > Here comes =E2=80=98guix shell=E2=80=99, a proposed replacement for =E2= =80=98guix environment=E2=80=99! > =E2=80=98guix environment=E2=80=99 would stay around though, at least for= some time, > probably for a long time. > > The differences to =E2=80=98guix environment=E2=80=99 are: > > 1. =E2=80=98--ad-hoc=E2=80=99 is the default. > > =E2=80=98guix shell hello=E2=80=99 =E2=89=8D =E2=80=98guix environ= ment --ad-hoc hello=E2=80=99 > =E2=80=98guix shell -D hello git=E2=80=99 =E2=89=8D =E2=80=98guix = environment hello --ad-hoc git=E2=80=99 > > 2. =E2=80=98guix shell=E2=80=99, without arguments, loads =E2=80=98guix= .scm=E2=80=99 or =E2=80=98manifest.scm=E2=80=99 > from the current directory or one of its ancestors. > > 3. =E2=80=98--load=E2=80=99/=E2=80=98-l=E2=80=99 is not =E2=80=98-f=E2= =80=99/=E2=80=98--install-from-file=E2=80=99 for consistency with > =E2=80=98guix package=E2=80=99. > > 4. =E2=80=98guix shell=E2=80=99 without arguments maintains a cache, su= ch that, the > second time you run it, it runs in ~0.1s (it does not even need to > connect to the daemon). > > If you run =E2=80=98guix pull=E2=80=99 and run again =E2=80=98guix s= hell=E2=80=99, it recomputes > the environment, as is currently the case with =E2=80=98guix environ= ment=E2=80=99. > > Here=E2=80=99s a summary of previous proposals: > > - Dave Thompson: https://lists.gnu.org/archive/html/guix-devel/2017-08/= msg00300.html > - [X] --ad-hoc is the default > - [X] caching > - [X] behavior with no arguments > - [ ] --load accepts > - [ ] Shepherd services > - [ ] 'guix environment --update' to explicitly update > - make --ad-hoc the default: https://issues.guix.gnu.org/38529 > - [X] https://issues.guix.gnu.org/38529#17: proposal for a new subcom= mand > deprecation of =E2=80=98guix environment=E2=80=99 > > I think records and Shepherd services could come later. > As for =E2=80=98--update=E2=80=99, I prefer the behavior implemented here= because it=E2=80=99s > stateless and thus more predictable. > > Thoughts? Are there other changes people would like to see? A few thoughts: 1) I can't be the only one that thinks it's a pain to rebuild the whole environment just because I updated the Guix client. It's especially frustrating when there is a regression that breaks the project, or the substitute servers are having a bad day. 2) One important use-case for tools like Bundler, npm, etc. is to exactly (within their limited ability to do so, of course) reproduce the environment for all developers working on the project. With 'guix environment', and now with this proposed 'guix shell', the resulting development environment depends upon the version of Guix being used. So, to make 'guix shell' a true universal replacement for these language-specific tools, there should be a way to "lock" to a specific version of Guix. Bundler has Gemfile.lock, npm has package-lock.json, etc. Guix has good support for using older versions of Guix already, so it seems feasible. I spend a non-trivial amount of time sorting out development environment issues for a couple dozen devs, so a tool that took most of the variables out of the equation would be really great. 3) I haven't looked at the patches to see if it has already been implemented, but when running 'guix shell' with no arguments, I think the search for the manifest file should follow the established conventions of Git, Bundler, etc. and search not only the current directory, but the parent directory and so on until it finds it or gets to / and gives up. This will make the tool much more usable when working inside a subdirectory within a project. Just some things to think about. I just don't want to see Guix commit to an interface that slams the door on future improvement due to compatibility reasons. I mean, what would you even name the next tool? guix... biome? Anyway, great work! Back to lurking. - Dave