From unknown Sun Aug 10 16:48:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64076: Error message leads user to a false cause of issue Resent-From: Christian Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 14 Jun 2023 23:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64076 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 64076@debbugs.gnu.org X-Debbugs-Original-To: "bug-guix@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.168678555620272 (code B ref -1); Wed, 14 Jun 2023 23:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jun 2023 23:32:36 +0000 Received: from localhost ([127.0.0.1]:45785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Zyd-0005Gt-JC for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:32:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:41462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Zyb-0005Gh-6K for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:32:34 -0400 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 1q9ZyV-0001qm-Oq for bug-guix@gnu.org; Wed, 14 Jun 2023 19:32:28 -0400 Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9ZyS-00009x-Lb for bug-guix@gnu.org; Wed, 14 Jun 2023 19:32:27 -0400 Date: Wed, 14 Jun 2023 23:32:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1686785542; x=1687044742; bh=nMsKgMNVDTZFmMcMZ376tQLNpjBOg6TviM/9VzUgJqo=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=WzGpLiGhq2UDFSD05t0c1lWXh/8fcnn1DycR7fbHXqhoCCEqKj5ywGD0D6T73wF7J Lxh3yDyJ0iIAViOGD3ZCEfvecawI+ezS+uV3vkwjD2T+iKxnFKBawzAEbuCEEZqdy8 NL2xm46qq6nG8TZt0jPOnKsHa9MsggpSFzM/AgA3IGPnU44N6TBIAeA3v0F1FlPXX1 +WNYJMTxJyvjr5riLU/h2sr6sV/dLWikqKCDQKNs14JG8r2QG3GgvYQAUKmWDPdJGM gv6TEUB8B6DdJK6Lq3aRCoBY/VJDBbUtcJPsGWJJG27JMJlEVN+f26mS23qG6TGLGt l1Y8whCqigsLw== From: Christian Miller Message-ID: Feedback-ID: 50909937:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.25; envelope-from=miller.christian@proton.me; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) If someone imports a module that has code which requires additional modules= to be imported but does not do that, the error message will fool the user = that he made a mistake with his own defined modules. cm@gnu /tmp/bug/demo$ guix build -L /tmp -f example.scm ice-9/eval.scm:223:20: In procedure proc: error: emacs-dash: unbound variable hint: Did you forget `(use-modules (bug demo var))'? I already have it imported but if I run the following command: cm@gnu /tmp/bug/demo$ guix build -L /tmp -f var.scm bug/demo/var.scm:14:22: error: git-fetch: unbound variable hint: Did you forget a `use-modules' form? We can see that the actual cause of the problem is that in the imported mod= ule (var) we forgot to import (guix git-download). The original command should directly tell that the user. I am new to Guile= Scheme and created a module with some copy/paste since I was just quickly = trying something out and thought I did something wrong how I defined those = modules. Example: /tmp =E2=94=9C=E2=94=80=E2=94=80 bug =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 demo =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 example.scm =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 var.scm // example.scm (define-module (bug demo example) #:use-module (bug demo var) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system emacs) #:use-module ((guix licenses) #:prefix license:)) (define-public emacs-solarized-theme (package (name "emacs-solarized-theme") (version "2.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/bbatsov/solarized-emacs/") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0l2lcdm2hsjasfkg4rmypa4mvbhglbkkyv0jg88ygc6py9klcccd")))) (build-system emacs-build-system) (propagated-inputs (list emacs-dash)) (home-page "https://github.com/bbatsov/solarized-emacs") (synopsis "Port of the Solarized theme for Emacs") (description "Solarized for Emacs is a port of the Solarized theme for Vim. This package provides a light and a dark variant.") (license license:gpl3+))) emacs-solarized-theme // var.scm (define-module (bug demo var) #:use-module (guix packages) #:use-module (guix gexp) ;;#:use-module (guix git-download) #:use-module (guix build-system emacs) #:use-module ((guix licenses) #:prefix license:) #:export (emacs-dash)) (define-public emacs-dash (package (name "emacs-dash") (version "2.19.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/magnars/dash.el") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0z6f8y1m9amhg427iz1d4xcyr6n0kj5w7kmiz134p320ixsdnzd8")))) (build-system emacs-build-system) (arguments (list #:tests? #t #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-byte-compile-error-on-warn (lambda _ (substitute* "Makefile" (("\\(setq byte-compile-error-on-warn t\\)") "(setq byte-compile-error-on-warn nil)"))))))) (home-page "https://github.com/magnars/dash.el") (synopsis "Modern list library for Emacs") (description "This package provides a modern list API library for Emacs= .") (license license:gpl3+))) Go to /tmp/bug/demo and run guix build -L /tmp -f example.scm Note that if you go to var.scm and uncomment line 4, it will build the pack= age. Also, shouldn't here the correct path be shown where the variable could be = imported like it normally does? demo/var.scm:10:22: error: git-fetch: unbound variable hint: Did you forget a `use-modules' form? demo/var.scm:19:18: error: emacs-build-system: unbound variable hint: Did you forget a `use-modules' form? Since normally I get the following back: bug/demo/example.scm:8:3: error: package: unbound variable hint: Did you forget `(use-modules (guix packages))'? which makes it really easy to work with it even if you are new to all this = stuff.