From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YCwfDtUyWGH0oQAAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 12:22:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mOzQCdUyWGGfJAAAB5/wlQ (envelope-from ) for ; Sat, 02 Oct 2021 10:22:13 +0000 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 85F5C2D94A for ; Sat, 2 Oct 2021 12:22:12 +0200 (CEST) Received: from localhost ([::1]:51612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWc9j-0001id-OD for larch@yhetil.org; Sat, 02 Oct 2021 06:22:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWc9d-0001iT-2h for guix-patches@gnu.org; Sat, 02 Oct 2021 06:22:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWc9a-0006uX-HK for guix-patches@gnu.org; Sat, 02 Oct 2021 06:22:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWc9a-0007SI-9I for guix-patches@gnu.org; Sat, 02 Oct 2021 06:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 10:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50960 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50960@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163317009928626 (code B ref -1); Sat, 02 Oct 2021 10:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Oct 2021 10:21:39 +0000 Received: from localhost ([127.0.0.1]:57928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWc96-0007RW-Oq for submit@debbugs.gnu.org; Sat, 02 Oct 2021 06:21:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:55002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWc94-0007RQ-Gq for submit@debbugs.gnu.org; Sat, 02 Oct 2021 06:21:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWc94-0001bP-9z for guix-patches@gnu.org; Sat, 02 Oct 2021 06:21:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49164) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWc94-0006TD-2W; Sat, 02 Oct 2021 06:21:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36458 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWc93-0007Yz-OL; Sat, 02 Oct 2021 06:21:29 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 2 Oct 2021 12:21:16 +0200 Message-Id: <20211002102116.27726-1-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633170132; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nlkwXH0avgm1UiJKgKU2dFx/c+7FOZnepLsyYgRBI7Q=; b=HO0RnmlF9+4E8AvbIYQQegFd2tiOGQ7nYi8CRW3HzhTlivDoAZjNDFTFcJfnvrPiqnUMoN xx1TrX93I/HVyGow5ovTUyxCUyvvOkuE5iZjulUiRzPZXykMslZTFHL9yZcYgNO4zodhNc HmW+2tUncoKLJYdKA8nhqe2J0qXDbzwjtzV6VZMHcXhfpPQOzHYdxtnHbYQmuuZ/dRRfJH /f7CEx3KAHJljp4nbt4RHPl0imlQEsYciSBYIrkIk9maBylw8m0oP1V6scIv2qO1GrPkQi /pBodCrcRrcw2/DUuPmqn2nqUO8OxSNyIwVGAiDLfybPIRYbpLEh4VsCVjYByA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633170132; a=rsa-sha256; cv=none; b=uX/FUfhs1Wo4eCI1TXutqtg9iNKXbU0QxFo+/UFcZBfvJwxWKrD/FpF649I/AXQAEseopj c4LXK+HCkVX/Rc2QiX6qdkL0geDApI7F4D1O087KQ7FrzBnfGWbgVOeLPBxA2XOn6V0czO LVX8ILIRne8ZMh91iJukOPjXl0kc6/dUzfwM2r3mY9/+V5RBHLq+SjMXskcnM9yax/VQb0 JSQrfiE9x/EAtqnRsZkWP1RZH8ka8UoydUNah7XyNuM9H3Ap3+0MW2mHvxyJHiSzAPrpxD mqEwEZ15+LaIn97My7TdnqRzVfzbulUu29q+wmFwQBm4Tdn5YODItGHjaDIwVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 85F5C2D94A X-Spam-Score: -0.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: vTOM0/KvP/OM 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 - [ ] 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 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