From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id sCjQOP6HXmWPNwEA9RJhRA:P1 (envelope-from ) for ; Thu, 23 Nov 2023 00:00:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sCjQOP6HXmWPNwEA9RJhRA (envelope-from ) for ; Thu, 23 Nov 2023 00:00:15 +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 7AC5622E45 for ; Thu, 23 Nov 2023 00:00:14 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=a39LRwIW; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700694014; 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=2tiWbsRA8PVgyJq+IV7kdE3x6X0PFVqf0IANwfAtifM=; b=NgTJSkJgVo7HzFyd/fkQlUlvJd7G5GC8BtpRAAecnsw2ALVPmxeOUu3VSIWi3ToYqkTWqY zDsTFUt5CFno/THL2ZBc8M6tRntI7Hh2rLnKdrKih2kUMtzbaWws3DuCKME/cAcHcitM4U eM6FR/nygnWoRkZTPU7w/foft+vb0h9pOzQoZIGs/ehIUMDGzZbMaye0dhPXEDsnfhs9Hu AxemXefstCj/H3gHtlui1w6+1x7WcohHOIgA3jTcYCxufLXDaOoLUmQ3L7Xbb4Z971fo3K S9JenIN8zwwpnXvhNzHtvQGM4ssX1TzpMMHs4//mJMlt5wXO79KWRtb9jxTr1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=a39LRwIW; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700694014; a=rsa-sha256; cv=none; b=VO933dxs1ANUE6ZeJ4PpFyaYH108Uwvx1DAXMqfbzvyzqCMhUgWRoWSPQtvxs2/SIJdoVn EsQGTJAMm+fYCs+tvLbulZhX7EjapseNBHnBOiyddtnG+uEfnJZ0PYD6CdSRoyAOP9yJ8J GprNARH4hJdDlwr7CaW1L5AEEsSsFvhcdhdF/rRu7BY+GTpgz3k88pRiGRjGSPQt+HBQyp 7ClMagHWGaxHes+BY2CHPNdGUmg9smvLJc+OWIHT7LyGEsfsy/B8JrKoqiWrslyNUE6fq+ COT0ta/Zop0/hZYC1oN2a5/kApAIQ7mGVHSyKkEZl3yIo8qId6InyN1nDaqoQg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5wCO-0000h5-RP; Wed, 22 Nov 2023 18:00:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5wCN-0000ey-6H for bug-guix@gnu.org; Wed, 22 Nov 2023 17:59:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5wCM-0000EG-U6 for bug-guix@gnu.org; Wed, 22 Nov 2023 17:59:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5wCP-0001jJ-UX for bug-guix@gnu.org; Wed, 22 Nov 2023 18:00:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#64858: ~guix shell -C -f guix.scm =?UTF-8?Q?=E2=80=A6~?= should not always need ~--rebuild-cache~ option to build the expected environment. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 22 Nov 2023 23:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64858 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Felix Lechner Cc: 64858@debbugs.gnu.org, Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Received: via spool by 64858-submit@debbugs.gnu.org id=B64858.17006939646555 (code B ref 64858); Wed, 22 Nov 2023 23:00:01 +0000 Received: (at 64858) by debbugs.gnu.org; 22 Nov 2023 22:59:24 +0000 Received: from localhost ([127.0.0.1]:60028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5wBo-0001hf-7X for submit@debbugs.gnu.org; Wed, 22 Nov 2023 17:59:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5wBl-0001hO-Vc for 64858@debbugs.gnu.org; Wed, 22 Nov 2023 17:59:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5wBb-0008UV-Mt; Wed, 22 Nov 2023 17:59:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=2tiWbsRA8PVgyJq+IV7kdE3x6X0PFVqf0IANwfAtifM=; b=a39LRwIW/2kM7U6cLYZS 163tvwymlkz7HYYIg3Or6/655M6WbmWe330KJN+u0AGgkYgxR8LyrrRnKtUfbS2OjGq4NTJBPe6E9 tOANckr/FJpld1tuAkDac2jbn372BXZ3h9/o4MAXd7nQjHyoFH1COTxEWwbmt0T1W9Rlv52VIX1hC chbhB441t5hZwREONEI2wM0lrCh+LyQ6lCBX42denDo3Mi6uDcf69ifd+PQyXtNifBRuGGwmaS1u+ oNyV52WREkuh/ZPFYzLdKXhlmCUxnPlJMY0yFSbiFlOcDQV8An09d2V73vZnnLH6VL3Pu3880ED0t wNU/wb+hlO1CRQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <9b178dff2dec09ca8af96fae54d5519c6d1cf1a4.1700457155.git.felix.lechner@lease-up.com> (Felix Lechner's message of "Sun, 19 Nov 2023 21:12:36 -0800") References: <9b178dff2dec09ca8af96fae54d5519c6d1cf1a4.1700457155.git.felix.lechner@lease-up.com> Date: Wed, 22 Nov 2023 23:59:08 +0100 Message-ID: <87v89tgzsz.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.82 X-Spam-Score: -6.82 X-Migadu-Queue-Id: 7AC5622E45 X-Migadu-Scanner: mx10.migadu.com X-TUID: FMavHAMmzd5q Hi Felix, Felix Lechner skribis: > --- a/guix/scripts/shell.scm > +++ b/guix/scripts/shell.scm > @@ -398,7 +398,7 @@ (define (key->file key) > (values #f #f))) > ((('nesting? . #t) . rest) > (loop rest system file (append specs '("nested guix")))) > - ((('load . ('package candidate)) . rest) > + ((('load . ('ad-hoc-package candidate)) . rest) > (if (and (not file) (null? specs)) > (loop rest system candidate specs) > (values #f #f))) Oooh. So there were really two bugs: 1. The one you describe Felix, where =E2=80=98guix shell -f guix.scm=E2= =80=99 would cache things in a nonsensical way (as if you had just run =E2=80=98guix shell=E2=80=99 with no arguments and no =E2=80=98guix.scm=E2=80=99 or = =E2=80=98manifest.scm=E2=80=99 files in $PWD). 2. The use case issue that I understood from Pierre-Henry=E2=80=99s repor= t, which is that =E2=80=98guix shell -f guix.scm=E2=80=99 shouldn=E2=80= =99t have any caching in the first place. I fixed it with these two commits (the first one is almost what you proposed, Felix): 5283d24062 shell: Disable caching for =E2=80=98guix shell -f guix.scm=E2= =80=99. 762be40098 shell: Correct cache key for =E2=80=98guix shell -f guix.scm= =E2=80=99. It seems to do the right thing now. Let me know what you think! Thanks, Ludo=E2=80=99.