unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment'
@ 2021-10-02 10:21 Ludovic Courtès
  2021-10-02 10:22 ` [bug#50960] [PATCH 01/10] packages: Add 'package-development-inputs' Ludovic Courtès
                   ` (11 more replies)
  0 siblings, 12 replies; 108+ messages in thread
From: Ludovic Courtès @ 2021-10-02 10:21 UTC (permalink / raw)
  To: 50960; +Cc: Ludovic Courtès

Hello Guix!

Here comes ‘guix shell’, a proposed replacement for ‘guix environment’!
‘guix environment’ would stay around though, at least for some time,
probably for a long time.

The differences to ‘guix environment’ are:

  1. ‘--ad-hoc’ is the default.

       ‘guix shell hello’ ≍ ‘guix environment --ad-hoc hello’
       ‘guix shell -D hello git’ ≍ ‘guix environment hello --ad-hoc git’

  2. ‘guix shell’, without arguments, loads ‘guix.scm’ or ‘manifest.scm’
     from the current directory or one of its ancestors.

  3. ‘--load’/‘-l’ is not ‘-f’/‘--install-from-file’ for consistency with
     ‘guix package’.

  4. ‘guix shell’ without arguments maintains a cache, such 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 ‘guix pull’ and run again ‘guix shell’, it recomputes
     the environment, as is currently the case with ‘guix environment’.

Here’s 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 <environment>
    - [ ] 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 subcommand
          deprecation of ‘guix environment’

I think <environment> records and Shepherd services could come later.
As for ‘--update’, I prefer the behavior implemented here because it’s
stateless and thus more predictable.

Thoughts?  Are there other changes people would like to see?

If there’s rough consensus I can work on v2 with documentation.  Please
let’s keep the discussion focused.  :-)

As for deprecation, I think there’s no rush.  I imagine there could be
several phases, like: initially we only mention deprecation in the manual,
later on ‘guix environment’ starts emitting a warning, and later (I guess
at least two years later, probably more) we ask ourselves whether to
remove ‘guix environment’.  At this point keeping it doesn’t cost us much.

Thanks,
Ludo’.

Ludovic Courtès (10):
  packages: Add 'package-development-inputs'.
  profiles: Add 'package->development-manifest'.
  DRAFT Add 'guix shell'.
  DRAFT shell: By default load the local 'guix.scm' or 'manifest.scm'
    file.
  environment: Add tests for '--profile'.
  environment: Skip derivation computation when '--profile' is used.
  environment: Do not connect to the daemon when '--profile' is used.
  environment: Autoload some modules.
  cache: Gracefully handle non-existent cache.
  shell: Maintain a profile cache.

 Makefile.am                         |   2 +
 doc/guix.texi                       |  52 ++++++
 guix/cache.scm                      |  10 +-
 guix/packages.scm                   |  10 ++
 guix/profiles.scm                   |  19 ++
 guix/scripts/environment.scm        | 260 +++++++++++++++-------------
 guix/scripts/shell.scm              | 254 +++++++++++++++++++++++++++
 po/guix/POTFILES.in                 |   1 +
 tests/guix-environment-container.sh |   8 +
 tests/guix-environment.sh           |   7 +
 tests/guix-shell.sh                 |  70 ++++++++
 tests/packages.scm                  |  14 ++
 tests/profiles.scm                  |   7 +
 13 files changed, 594 insertions(+), 120 deletions(-)
 create mode 100644 guix/scripts/shell.scm
 create mode 100644 tests/guix-shell.sh

-- 
2.33.0





^ permalink raw reply	[flat|nested] 108+ messages in thread

end of thread, other threads:[~2021-10-25 19:49 UTC | newest]

Thread overview: 108+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 10:21 [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Ludovic Courtès
2021-10-02 10:22 ` [bug#50960] [PATCH 01/10] packages: Add 'package-development-inputs' Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 02/10] profiles: Add 'package->development-manifest' Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 03/10] DRAFT Add 'guix shell' Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 04/10] DRAFT shell: By default load the local 'guix.scm' or 'manifest.scm' file Ludovic Courtès
2021-10-02 11:52     ` Liliana Marie Prikler
2021-10-02 13:43       ` [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Ludovic Courtès
2021-10-05  7:50         ` Maxime Devos
2021-10-08  7:44           ` Ludovic Courtès
2021-10-02 14:15     ` [bug#50960] [PATCH 04/10] DRAFT shell: By default load the local 'guix.scm' or 'manifest.scm' file Maxime Devos
2021-10-04  8:07       ` Ludovic Courtès
2021-10-05  7:51     ` Maxime Devos
2021-10-02 10:22   ` [bug#50960] [PATCH 05/10] environment: Add tests for '--profile' Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 06/10] environment: Skip derivation computation when '--profile' is used Ludovic Courtès
2021-10-02 11:39     ` Liliana Marie Prikler
2021-10-02 13:46       ` [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 07/10] environment: Do not connect to the daemon when '--profile' is used Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 08/10] environment: Autoload some modules Ludovic Courtès
2021-10-02 10:22   ` [bug#50960] [PATCH 09/10] cache: Gracefully handle non-existent cache Ludovic Courtès
2021-10-02 13:28     ` Maxime Devos
2021-10-02 10:22   ` [bug#50960] [PATCH 10/10] shell: Maintain a profile cache Ludovic Courtès
2021-10-02 13:43     ` Maxime Devos
2021-10-02 14:12       ` Ludovic Courtès
2021-10-02 14:47         ` Maxime Devos
2021-10-04  8:19           ` Ludovic Courtès
2021-10-04 14:20             ` zimoun
2021-10-04 15:58             ` Maxime Devos
2021-10-08  7:37               ` Ludovic Courtès
2021-10-02 13:52     ` Maxime Devos
2021-10-02 14:14       ` Ludovic Courtès
2021-10-02 14:22         ` Maxime Devos
2021-10-04  8:08           ` Ludovic Courtès
2021-10-02 10:50 ` [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Jelle Licht
2021-10-02 13:52   ` Ludovic Courtès
2021-10-02 12:10 ` pelzflorian (Florian Pelz)
2021-10-02 13:40   ` Ludovic Courtès
2021-10-02 15:08     ` pelzflorian (Florian Pelz)
2021-10-04  8:22       ` Ludovic Courtès
2021-10-04  9:23         ` pelzflorian (Florian Pelz)
2021-10-04 16:50         ` Maxime Devos
2021-10-02 13:03 ` Christine Lemmer-Webber
2021-10-02 14:00 ` [bug#50960] ‘guix shell’ shebangs Ludovic Courtès
2021-10-03 22:50   ` Katherine Cox-Buday
2021-10-02 23:57 ` [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Vagrant Cascadian
2021-10-03  8:36   ` Nicolò Balzarotti
2021-10-04  8:34   ` Ludovic Courtès
2021-10-04 17:12     ` Maxime Devos
2021-10-04  6:56 ` zimoun
2021-10-04  8:39   ` Ludovic Courtès
2021-10-04 10:40     ` zimoun
2021-10-04 12:23       ` Ludovic Courtès
2021-10-04 13:42         ` zimoun
2021-10-04 17:38 ` Leo Famulari
2021-10-08  7:43   ` Ludovic Courtès
2021-10-08 16:16     ` Leo Famulari
2021-10-09 13:38       ` Ludovic Courtès
2021-10-11  0:29         ` Leo Famulari
2021-10-04 21:29 ` [bug#50960] [EXT] " Thompson, David
2021-10-07  9:26   ` Ludovic Courtès
2021-10-07 10:52     ` pelzflorian (Florian Pelz)
2021-10-07 11:17       ` [bug#50960] [EXT] " Thompson, David
2021-10-07 12:01         ` pelzflorian (Florian Pelz)
2021-10-08 14:24         ` Katherine Cox-Buday
2021-10-11  9:13     ` zimoun
2021-10-06  8:12 ` Konrad Hinsen
2021-10-07  8:34   ` Ludovic Courtès
2021-10-07  9:15     ` Liliana Marie Prikler
2021-10-08 15:45     ` Konrad Hinsen
2021-10-09  7:45       ` Liliana Marie Prikler
2021-10-11  8:32       ` Ludovic Courtès
2021-10-09  8:07 ` Stefan
2021-10-11 21:37 ` [bug#50960] [PATCH v2 00/11] 'guix shell' strikes again Ludovic Courtès
2021-10-11 21:37   ` [bug#50960] [PATCH v2 01/11] packages: Add 'package-development-inputs' Ludovic Courtès
2021-10-12  6:39     ` zimoun
2021-10-12  9:54       ` Ludovic Courtès
2021-10-12 11:52         ` zimoun
2021-10-11 21:38   ` [bug#50960] [PATCH v2 02/11] profiles: Add 'package->development-manifest' Ludovic Courtès
2021-10-12  6:43     ` zimoun
2021-10-12  9:27       ` Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 03/11] Add 'guix shell' Ludovic Courtès
2021-10-13 16:51     ` pelzflorian (Florian Pelz)
2021-10-11 21:38   ` [bug#50960] [PATCH v2 04/11] DRAFT shell: By default load the local 'guix.scm' or 'manifest.scm' file Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 05/11] DRAFT shell: Honor in ~/.config/guix/shell-authorized-directories Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 06/11] environment: Add tests for '--profile' Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 07/11] environment: Skip derivation computation when '--profile' is used Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 08/11] environment: Do not connect to the daemon " Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 09/11] environment: Autoload some modules Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 10/11] cache: Gracefully handle non-existent cache Ludovic Courtès
2021-10-11 21:38   ` [bug#50960] [PATCH v2 11/11] shell: Maintain a profile cache Ludovic Courtès
2021-10-12  8:53   ` [bug#50960] [PATCH v2 00/11] 'guix shell' strikes again pelzflorian (Florian Pelz)
2021-10-12  8:57     ` pelzflorian (Florian Pelz)
2021-10-12  9:55       ` Ludovic Courtès
2021-10-18 19:52   ` [bug#50960] [PATCH v3 00/10] Adding 'guix shell': last call! Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 01/10] packages: Add 'package-development-inputs' Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 02/10] profiles: Add 'package->development-manifest' Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 03/10] Add 'guix shell' Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 04/10] shell: By default load the local 'guix.scm' or 'manifest.scm' file Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 05/10] environment: Add tests for '--profile' Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 06/10] environment: Skip derivation computation when '--profile' is used Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 07/10] environment: Do not connect to the daemon " Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 08/10] environment: Autoload some modules Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 09/10] cache: Gracefully handle non-existent cache Ludovic Courtès
2021-10-18 19:52     ` [bug#50960] [PATCH v3 10/10] shell: Maintain a profile cache Ludovic Courtès
2021-10-19  8:43     ` [bug#50960] [PATCH v3 00/10] Adding 'guix shell': last call! zimoun
2021-10-25 13:41     ` [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' zimoun
2021-10-25 18:19       ` Ludovic Courtès
2021-10-25 19:45         ` zimoun
2021-10-25 18:25     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).