From patchwork Mon Aug 30 21:26:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 32426 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CA44927BBE3; Mon, 30 Aug 2021 22:28:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C747727BBE1 for ; Mon, 30 Aug 2021 22:28:20 +0100 (BST) Received: from localhost ([::1]:46248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKopH-0002CG-RO for patchwork@mira.cbaines.net; Mon, 30 Aug 2021 17:28:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKop1-000222-9q for guix-patches@gnu.org; Mon, 30 Aug 2021 17:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKop1-0003BC-1O for guix-patches@gnu.org; Mon, 30 Aug 2021 17:28:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKooz-0008Jv-MP; Mon, 30 Aug 2021 17:28:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50286] [RFC PATCH] Let 'package-location' returns location of surrounding 'let'. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: iskarian@mgsn.dev, guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 21:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50286 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50286@debbugs.gnu.org Cc: iskarian@mgsn.dev X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: iskarian@mgsn.dev Received: via spool by submit@debbugs.gnu.org id=B.163035882731915 (code B ref -1); Mon, 30 Aug 2021 21:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Aug 2021 21:27:07 +0000 Received: from localhost ([127.0.0.1]:60497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKoo3-0008IY-0z for submit@debbugs.gnu.org; Mon, 30 Aug 2021 17:27:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:47366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKonx-0008Hy-L0 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 17:27:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKonw-0000aC-Ue for guix-patches@gnu.org; Mon, 30 Aug 2021 17:26:57 -0400 Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]:39452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKont-0002Ov-Di for guix-patches@gnu.org; Mon, 30 Aug 2021 17:26:56 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by andre.telenet-ops.be with bizsmtp id nxSo250030mfAB401xSoCE; Mon, 30 Aug 2021 23:26:48 +0200 Message-ID: <0b61652d751633f78e876a27be88ed14e47527b6.camel@telenet.be> From: Maxime Devos Date: Mon, 30 Aug 2021 23:26:43 +0200 User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630358808; bh=0w53oDbXRB6iRNiHuqeAfs+YbBBX/rfBDYTyzH9YoBQ=; h=Subject:From:To:Date; b=TivfyGgvqiWq7nOIWAoPeqObC/lljmBxqxFBUf6xak4vMuRX2UgjJtLrbTpMOiULF HI3no/eQtAt3l4IRO6RwAGQX5HL+UgK4OpTgmapsHkwCBd25cL6vauqjzVOhH1d7kt QBF1y1wRz6mVo+9OXzoRINZzsuUGwlMQ5x9K6Oe5l6LlYHmrXNUZbuMpJf8tpmpRLP Ml4txeF733T5RYG3okTwaLwImRc6IOETv1NCfUzkMCUxHG7KTlhLtuErurOPFS7WYb gnGbiF3XGrr6SCzZqKLVSSI/NEO8P6sfGrQAw2Ib5slmpSQYAx10YKHZGIf6fXlEdE PqYW39wUyq2HQ== Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches X-Debbugs-CC: ludo@gnu.org X-Debbugs-CC: iskarian@mgsn.dev Hi guix, These three patches allows (guix upstream) to replace the values in the surrounding 'let' form, if any. It's important for constructs like: (define-public gnash (let ((version "0.8.11") (commit "583ccbc1275c7701dc4843ec12142ff86bb305b4") (revision "0")) (package (name "gnash") (version (git-version version revision commit)) (source (git-reference (url "https://example.org") (commit commit))) [...]))) such that it can update the version, commit, revision. (Currently only the version will be updatable, but see and for work on making 'commit' updatable). More details in the patches themselves. Greetings, Maxime From fd716c2924c96a0bf908f615adaa404a3e382e7c Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 30 Aug 2021 20:31:00 +0200 Subject: [PATCH 3/3] guix: Find 'let' binding when using guile@3.0.0. Without this patch, errors like this result: [ 90%] LOAD gnu/services/nfs.scm WARNING: (gnu services nfs): imported module (guix) overrides core binding `let' WARNING: (gnu services nfs): `let' imported from both (guile) and (guix) WARNING: (gnu services nfs): imported module (guix) overrides core binding `let' WARNING: (gnu services nfs): `let' imported from both (guile) and (guix) ice-9/eval.scm:293:34: error: let: unbound variable hint: Did you forget `(use-modules (srfi srfi-71))'? I don't know why this happens, but this patch stops this error. * guix.scm: Hide 'let' and 'let*' when importing (guix packages). --- guix.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix.scm b/guix.scm index 42bc8c8818..7e1e5fb109 100644 --- a/guix.scm +++ b/guix.scm @@ -36,5 +36,10 @@ (for-each (let ((i (module-public-interface (current-module)))) (lambda (m) - (module-use! i (resolve-interface `(guix ,m))))) + (module-use! i (resolve-interface `(guix ,m) + ;; XXX: why is this required with Guile 3.0.2 + ;; to allow (gnu services nfs) to compile? + #:hide (if (eq? m 'packages) + '(let let*) + '()))))) %public-modules))) -- 2.33.0