From debbugs-submit-bounces@debbugs.gnu.org Mon May 16 17:04:34 2022 Received: (at submit) by debbugs.gnu.org; 16 May 2022 21:04:34 +0000 Received: from localhost ([127.0.0.1]:55147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqhtB-0005VX-Iu for submit@debbugs.gnu.org; Mon, 16 May 2022 17:04:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:32996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqht9-0005VO-Cj for submit@debbugs.gnu.org; Mon, 16 May 2022 17:04:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqht9-0002dZ-7Y for bug-guix@gnu.org; Mon, 16 May 2022 17:04:23 -0400 Received: from mail-4317.proton.ch ([185.70.43.17]:47201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqht5-0008WS-Or for bug-guix@gnu.org; Mon, 16 May 2022 17:04:22 -0400 Date: Mon, 16 May 2022 21:04:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail3; t=1652735054; bh=8vcFFcQ/lKaU42XEgyH5HPNb19AU9KZwusObGmSju/I=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=amyUJtDKJsTWPyxrZZx82jdSk6L+/OlGOY9pAmegCk1iIf2oFk9Rbn+D17Z/JZWNJ ws6pPJ+Vl+uoWxLKN5jzBWZY0PWcTKnFJbkV0o2WEbs/T0pesETcpK1tmZWNWyx4WI ue1f3qDOjs5/dIhCAHbmQd92Afys0+G1H5v9JV54aFgBJUvAxsefvw1NqX7hIbGU+u Nh1XeyKQm9iER8corR5yiTPu7EgIzgm6MW/TwAzqnoTQ1kVG5Humuz5/daY22GOuDP 4cLjf1HX8xyPwBMVFr7ecrgYBEehBZ5tsuDgkF/BKPD5SC8bVKENHRmJBmrH+GDuCJ F7le/vVxiofzw== To: "bug-guix@gnu.org" From: Attila Lendvai Subject: (current-filename) is #f when guix pull'ing Message-ID: <625DOHHScuzJjNNfdQOqaLqGWVTmXC-S9PcF2xU3nzsFYG4XYTSEt0NGXDSXnBqVHqYqr6AsEbTysg7y_fxoqeBkbEtCqMZrx9muo3DlvS0=@lendvai.name> Feedback-ID: 28384833: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.17; envelope-from=attila@lendvai.name; helo=mail-4317.proton.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, SPF_HELO_NONE=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-Debbugs-Envelope-To: submit 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: , Reply-To: Attila Lendvai Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) the actual context where i'm encountering this is a package definition wher= e i want to load some hashes from a file relative the to the .scm file: (define-public foo (let ((hashes (with-input-from-file (string-append (dirname (current-filename)) "/foo.hashes") read))) (package ...))) this works fine in a `./pre-inst-env build foo`, but i think there's someth= ing special in how `guix pull` compiles the scm files, and (c-f) expands to= #f. guix pull works, but afterwards: $ guix system --on-error=3Dbacktrace reconfigure --allow-downgrades /etc/gu= ix/config.scm guix system: error: failed to load '/etc/guix/config.scm': guix-crypto/packages/ethereum.scm:47:36: In procedure scm_to_utf8_stringn: = Wrong type argument in position 1 (expecting string): #f In ice-9/boot-9.scm: 222:29 19 (map1 (((gnu)) ((gnu system)) ((gnu system #)) ((# =E2=80= =A6)) =E2=80=A6)) 222:29 18 (map1 (((gnu system)) ((gnu system file-systems)) (#) = =E2=80=A6)) 222:29 17 (map1 (((gnu system file-systems)) ((oop goops)) ((=E2=80= =A6)) =E2=80=A6)) 222:29 16 (map1 (((oop goops)) ((shepherd service)) ((nongnu =E2=80= =A6)) =E2=80=A6)) 222:29 15 (map1 (((shepherd service)) ((nongnu packages linux)) = =E2=80=A6)) 222:29 14 (map1 (((nongnu packages linux)) ((guix-crypto # #)) # = =E2=80=A6)) 222:17 13 (map1 (((guix-crypto packages ethereum)) ((# # #)) (#) = =E2=80=A6)) 3936:31 12 (_ ((guix-crypto packages ethereum))) 3327:17 11 (resolve-interface (guix-crypto packages ethereum) # _ # = =E2=80=A6) In ice-9/threads.scm: 390:8 10 (_ _) In ice-9/boot-9.scm: 3253:13 9 (_) In ice-9/threads.scm: 390:8 8 (_ _) In ice-9/boot-9.scm: 3544:20 7 (_) 2836:4 6 (save-module-excursion #) 3564:26 5 (_) In unknown file: 4 (primitive-load-path "guix-crypto/packages/ethereum" #<= =E2=80=A6>) In guix-crypto/packages/ethereum.scm: 47:36 3 (_) In unknown file: 2 (dirname #f) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1780:13 0 (_ #<&compound-exception components: (#<&assertion-fail= =E2=80=A6>) i would be happy to avoid using (c-f), but i failed to find a way in Guile'= s module reflection API. -- =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CPeople who have never gone to school have never developed negative= attitudes toward exploring their world.=E2=80=9D =09=E2=80=94 Grace Llewellyn