From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sK1mBAUxFmN3UwEAbAwnHQ (envelope-from ) for ; Mon, 05 Sep 2022 19:25:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ECJRBAUxFmMHHAEA9RJhRA (envelope-from ) for ; Mon, 05 Sep 2022 19:25:25 +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 9194C287F6 for ; Mon, 5 Sep 2022 19:25:24 +0200 (CEST) Received: from localhost ([::1]:44626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVFqd-0002AS-12 for larch@yhetil.org; Mon, 05 Sep 2022 13:25:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVFpL-0000gB-5H for bug-guix@gnu.org; Mon, 05 Sep 2022 13:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVFpK-0001td-IB for bug-guix@gnu.org; Mon, 05 Sep 2022 13:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVFpK-000510-67 for bug-guix@gnu.org; Mon, 05 Sep 2022 13:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57467: 'guix shell' does not honor default behavior when given a specific command to run Resent-From: "Thompson, David" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Sep 2022 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57467 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 57467-donenotabug@debbugs.gnu.org, 57467@debbugs.gnu.org Received: via spool by 57467-submit@debbugs.gnu.org id=B57467.166239862719258 (code B ref 57467); Mon, 05 Sep 2022 17:24:02 +0000 Received: (at 57467) by debbugs.gnu.org; 5 Sep 2022 17:23:47 +0000 Received: from localhost ([127.0.0.1]:48751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVFp4-00050L-JI for submit@debbugs.gnu.org; Mon, 05 Sep 2022 13:23:47 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:43525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVFp3-000500-9W for 57467@debbugs.gnu.org; Mon, 05 Sep 2022 13:23:45 -0400 Received: by mail-lf1-f45.google.com with SMTP id v26so13910951lfd.10 for <57467@debbugs.gnu.org>; Mon, 05 Sep 2022 10:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=5yNpqKcxLQbWAoZ0JG0ZUmIPo/nlbiLqchPlOkKVbA0=; b=z54+G4nrC+w9iOB6RnokeixQlndaNbbJ6UKKDs32wKWg+v+iYnpzbgwcL6T9Q2IMjR 8JTfxoUHWFHUeN6hRQ6K8/4UtXdyQ5Y+wopToLI8TMU1vSzEbonvVHlqErZvsEbxqOHu rarUFAS7+CDPQ+tKDgM9LcbKccZ+mDBve17d1Dowawwcr8JellpMx0CoF3+8xItTEtod Kfe54PPxIFb1toNH6LmxkpeSMzin+6N3aid5hc+uBp3cnq36W3LXVN3VPIIX1gO4ZbaO 2OZOz55/qm4JivydYARxrJ7s7eYEemeOCk1NE9Ebp1lzV7GghASyY7PvIXBp4i4UWa+R ANtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=5yNpqKcxLQbWAoZ0JG0ZUmIPo/nlbiLqchPlOkKVbA0=; b=PMt8UZJcQrXiFb1NHvd86V6xET0Z922zXCKFvE7BGAswXf2IUWprXJVhh/EZVUJk3U ODPG9YVkC7UAMhmDC3zw6/oLVYy7xlMM3UZ9HYNcHKnRweHzc1i3eEq4VlN6A5nrAiAq 8bqyAljf4WR2DWJSY4DvMnAZ5XyHKBh2sgEvE5o24qwvuPiZCANmDRMNg+lbH1UscvDW LkMGCCBHOIubhP4jQcki2ifCE5P8vSIGu07S4e63RiehMNnCIMlBTESXWI5JSXMTYsYQ zzrcs/DsBgYJgNva2fJvnkqV1wtBNyPRWvPfqn2loUPcnU4nIqevvtErE0EF5HxdWHDq XObw== X-Gm-Message-State: ACgBeo15E8p8SUVJHhiPDF3efoyKRrpjba/COV2ElTP0VABFqR3yvW3P AvGtonjn5RoqbP3GHTJsANAIcFTuT6yB7NG2dPAcrQ== X-Google-Smtp-Source: AA6agR6D9qz9xy0uVCEfyJqgmGMuBNAerszymWiZ6+pO7PspO6PLj2lcYTWIodbpK7LXa7wicO21MY+5n5HLHmDS034= X-Received: by 2002:a05:6512:3fc:b0:494:663f:c017 with SMTP id n28-20020a05651203fc00b00494663fc017mr13398422lfq.472.1662398618900; Mon, 05 Sep 2022 10:23:38 -0700 (PDT) MIME-Version: 1.0 References: <871qsq3r83.fsf_-_@gnu.org> In-Reply-To: <871qsq3r83.fsf_-_@gnu.org> From: "Thompson, David" Date: Mon, 5 Sep 2022 13:23:27 -0400 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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1662398724; 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=5yNpqKcxLQbWAoZ0JG0ZUmIPo/nlbiLqchPlOkKVbA0=; b=KgYYXaJUO4vEeTf4k1VkIJJmCb1NTPAr7a8GA1AAZm94iq5C2fldwtJzoeXcJ2mdLk7FOA iolamt4BzYsczQr/hwRcHygyIWC77xwqFZ+yN9qqBV0gTa50HQ0wS14fLmRq6gT++/eK4r Bte0GPFs5MvETLksQTthFzysS+gKedwe2uiou1qGL68sZymm7Q42UXGAQQd90t7sgF1K0+ 5E5KI26XGTIOovmQagcYO0iP8ZNg4f/BpTwuiff0B6I448/TantGgau0jgCVFeIT0KQ3Mz NJdv5y7LydTbyouOzRr8ZRom8sQMyofkjS7UrsbB3Bwsp1uZxSrURccH8jmK6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662398724; a=rsa-sha256; cv=none; b=C5MbAfJtneG0CJUju2i+oSt429E4xdIvAODb6frfufgelkONFdCNHQylrQH8J3LCgH8gBs rN7CLsogawOO7YyBU8tBStbykaFgw/brD0ntZZagB2M0h+4vfuRphx1vP1pHq0UcQ2yOAh vriZ70ufKXRLPD0VXnuxzZGFYRiPZ04k5/5qtXC2PWgDXqKicdlrFX6OTuZlw4fNdiJPlK vhtxoCNe3pOeZYBD/VBH3mtUaulu4Rn1lNQmjJwS9s2cO3AQEI5nyaN2j5Fee/4DcoMAXm K5zIUQjp7Gqs4Cs/S4N1tk2umTnML/2/FVU8U2BmHFEJkVqdLSoWRhuQIEIaJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=z54+G4nr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.72 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=z54+G4nr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9194C287F6 X-Spam-Score: 2.72 X-Migadu-Scanner: scn1.migadu.com X-TUID: lb+3jtZe8F9O Hi Ludo, On Mon, Sep 5, 2022 at 9:06 AM Ludovic Court=C3=A8s wrote: > > Hi David, > > Thanks for your feedback on this. > > "Thompson, David" skribis: > > > So there are some competing expectations here. The status quo is that > > non-interactive invocations of 'guix shell' will not load a guix.scm or > > manifest.scm file unless explicitly told to via --file/--manifest follo= wing > > the "explicit is better than implicit" philosophy. People like myself = who > > almost exclusively invoke 'guix shell' without any arguments would expe= ct > > that 'guix shell -- make' would load their guix.scm file like they're u= sed > > to. It is the latter expectation that is typically the status quo in o= ther > > language environments. For example, in Ruby land, 'bundle exec foo' ru= ns > > the command 'foo' non-interactively in the context of a project and you > > don't have to tell it where to find the conventional Gemfile because it= 's > > the default. Treating interactive and non-interactive invocation > > differently in 'guix shell' was a surprise for me. Of course, 'guix sh= ell > > -D -f guix.scm -- make' works, but it doesn't "just work." > > Right. As you note, there were different expectations and constraints > when we discussed this. We ended up with a tradeoff that has its pros > and cons. The whole discussion took place here: > > https://issues.guix.gnu.org/50960 > > As a side note, I think as a project we may want to set up an RFC kind > of process to have a documented way to make decisions like these. This > would ensure every person who wants to chime in has an opportunity to do > so, even people who would not follow implementation discussions or > follow the patch stream on guix-patches. Food for thought! Yeah, that could be a good future improvement. For what it's worth, though, I do think you gave plenty of opportunity for commenting when you posted that patch set. It was just bad timing for me and I wasn't able to participate in the discussion much. It's all good, I think 'guix shell' is a worthy successor to 'guix environment' as it has better UX and performance. After all, it implements what I wanted from 'guix environment' all those years ago where the --ad-hoc behavior is the default. > > Both viewpoints have their merits and I'm wondering if there's a way > > to satisfy both expectations. Perhaps 'guix shell -- make' would load > > guix.scm, but 'guix shell --pure -- make', or any invocation with any > > flags, would not? Or, less ideal, a new short flag that can be passed > > that would be the equivalent of `-D -f guix.scm` (or the manifest.scm > > variant) to at least make for less typing. Personally, I think that > > defaulting to loading from a conventional file when no packages are > > specified is much more user friendly than generating an empty profile, > > regardless of interactive vs. non-interactive. > > The main reason to me for distinguishing non-interactive behavior is > ensuring that scripts behave in a deterministic fashion, as opposed to > having their behavior dependent on the presence of a file in $PWD. > > FWIW, I=E2=80=99m rather satisfied with the current behavior, though I=E2= =80=99m open to > other opinions (and indeed, feedback from users of other tools in this > area is much welcome). > > The main difficulty here is that, should we eventually decide to change > behaviors, we=E2=80=99ll have to devise a migration timeline etc. (As an > example, we chose to keep =E2=80=98guix environment=E2=80=99 until at lea= st May 2023; > all this must take time if we want to avoid breaking user workflows.) It seems that I'm all alone in wanting this and it would be far too annoying to go through a deprecation process for a change this small, anyway. I'm going to close this bug. Thanks for the additional context. - Dave