From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QMH6OoaHmWaBtQAAqHPOHw:P1 (envelope-from ) for ; Thu, 18 Jul 2024 21:22:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QMH6OoaHmWaBtQAAqHPOHw (envelope-from ) for ; Thu, 18 Jul 2024 23:22:15 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b="vSP+U0/e"; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=iBOwgXnp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721337734; 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: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=4Vr5sT6pAU0YiPcPMQEGnc8x4PDPaMiC660xx80EhTI=; b=rLJajK4g2EczhHx75bDi2zzr6wSg0udPKYVzaadYo/CS3ooh+ksgPU0E5/lHQOQ6TTX03A 2/NjBURyYhKUnXk+fOCOXLjZSvGDMyOOyd4/GAirgMkZ2tWBGDF86NVhG83uYXTIyHNHZX tB4abmJFWTqvBW2zlK5Wd8LRc3SIaRMlBJnh25I1M6ceIb6b9qYfSgGAaYR1UGw2PoQNYj nUwTfd7/AJ64fkE2m3XPRVMQ/e6d8lRgcOA/riYURhHrY3B0JpFOOJ5borzpzbRQZNBiJ9 wQybqlznaQv0XsPNXtwRVH9neLYuT2Pai1HuLttrUGSBCJu6gvW6dF0HjtKl2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721337734; a=rsa-sha256; cv=none; b=lx+cIAfs/M7hsU5NRKvXWMpbdx7KIH18EQlw2hMBiN88/dUnLlG4unV0OrvI/IZLZptBy1 /MNhypOyo3JmMD+wyC53yXP0vpmDuyC1piQKVTCwVBQ50CdchYTnRyS482jF+/TyOj/1XE 7nqxeFhl2PthY3UrZl8NLlGxwT4jqfOfvG9dJwOed+rAiLlgn2EweGSAPBjT+2ac1rBNkQ paEWxyfMV7Ui70X6Y0OF0oZHvsbpvGO0F+MYl9YySsTet9hmwtw8w58GYwIO1lV28iQ+ye 2QBMbmOFjWLaRH0HANMktEPqz8SpzQWpNULU0ypWZqmKy/jyDzYf84z2ZnMXrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b="vSP+U0/e"; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=iBOwgXnp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=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" 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 BCA9274434 for ; Thu, 18 Jul 2024 23:22:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUYZb-00006b-5c; Thu, 18 Jul 2024 17:21:59 -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 1sUYZa-000064-Ck for bug-guix@gnu.org; Thu, 18 Jul 2024 17:21:58 -0400 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 1sUYZa-0002iW-4i for bug-guix@gnu.org; Thu, 18 Jul 2024 17:21:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUYZe-0006h4-0C for bug-guix@gnu.org; Thu, 18 Jul 2024 17:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 18 Jul 2024 21:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71979 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 71979@debbugs.gnu.org Received: via spool by 71979-submit@debbugs.gnu.org id=B71979.172133770525700 (code B ref 71979); Thu, 18 Jul 2024 21:22:01 +0000 Received: (at 71979) by debbugs.gnu.org; 18 Jul 2024 21:21:45 +0000 Received: from localhost ([127.0.0.1]:38197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUYZN-0006gR-A3 for submit@debbugs.gnu.org; Thu, 18 Jul 2024 17:21:45 -0400 Received: from wolfsden.cz ([37.205.8.62]:53558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sUYZK-0006gI-9c for 71979@debbugs.gnu.org; Thu, 18 Jul 2024 17:21:43 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id AC87824D87B; Thu, 18 Jul 2024 21:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1721337697; bh=0rN6Em4xsV+jkdTbrFujGvf3QEd4J6FCfO1ylPu33YY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=vSP+U0/eDsmdtFFc3BCqRNLgUI74ZD7nrh/gTFyeGT3f7tFa12NmmCzUTb+k4dnfo 1kAKdGOFb62c2S0NoB2emzEn/DUmEWJfrO7PwNAyVLyM1ULfuxi3i03i7+cBVENCyE o6zmEmWtYbB4WspNfFH2cSqMwJD2r628KuXuTK8Xga1ccyvO1xjgQZpEp0zND3Huei t07ch+FDx0tZq6fEbYk8JYtF1SdTKszYkl9VVguG0bHf+RQMhelzzFxctXrsgCZvgW tPMHJrXGn8ELQlrozHtl8fTmG184cnucmoCV4DE8TEmC/B2IH+bX0TPjLfJ9PjCbF+ nb0UtQVIS7Z+hT5cp91JMtZX6pFvayyAvJQQ+kkobuS0GjHol7Zt8FDn+7GcI9lHaz p7wEz+weyRtZLStktEL/xd2jJzJoHrjLU/i+0682gJDzTDcwGC1LaLcSwq3R0vlU8c 2i94cgzB22T3igrRqf79xBLs4R9dtRVcHpoiOLu2TeNo5AuAB2pcNfcJ3+NR60EIop XwwZLqoa/cFHgHUYZoGakWcewvdRQyL0jCd4K6On6BSc+BVGsrN7Hx89UIOSQARd1a t22S2i6mry7KBdLgaN9gj22cCK/qBocZoOOP8QQVYqqF5RfOqg2rc1L9r4B/GCc+ah XOKQp+fAt5kThGvBlIecigog= Received: from localhost (unknown [193.32.127.144]) by wolfsden.cz (Postfix) with ESMTPSA id E5BAB24FA17; Thu, 18 Jul 2024 21:21:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1721337693; bh=0rN6Em4xsV+jkdTbrFujGvf3QEd4J6FCfO1ylPu33YY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=iBOwgXnpiLeIV2jzljnp1HbRfKYT5nNuOubLsh3HtsN3O/OAOBQWqbaKZZkdcY5NB d25cVVmUCcowNwWH2lxowVUpFd9o+pbfDq2m/U4282CG3pujaWAqsV8ghc3P4Jo/Hn Vr6kqGnZEQmfhTUOg1s9wbEtXRxu9pwLX7ifP3cJZZXsJUEB2UeV/PhllQvyF/O9H9 CNDGFwW58LyvkAqCyj4Q/olcPgV6nUIYc947hxEMErsC/eIUH1GxiW4X2x7VLx34vN fDTHR+Fx890i3cGCfgtSh+v/V45Btw6tWjfsSAmUZ495eVCb+RgOkEx9fSVnT8MUpD J+6//szexPFFBMAGCwvg6loXIKBUr1DteuuXORmE8nSlc1lzhB7/35MQ8snMXTHa9K pWKgNpSH+QjN2uAOWv3hsIgHiQ1H5T7kM/AXAsIDoQpajiQdx0r/yQC4NJqxNl1vch lQ0es5+esgfSxHJ9arfyPjpIltgVmlQL6Y1YwaB/YDwR1RziwYh7XiuFTL01Uw1QBb lB+XmPtD9OFyh/KbG/BJmbnRxF/yytKmrQVQYn94TBFuNbO01OM/h+h1DtiC41nMhl WGIhQAt9BSMTa+gAIkgmLg+UzoyDPDF45E3ADun3lOVORwFFiigN377yG+XKB1kotM UJWbzfvWS9v4W92eKqTRhE90= Date: Thu, 18 Jul 2024 23:21:32 +0200 From: Tomas Volf <~@wolfsden.cz> Message-ID: References: <87ed7qvhn3.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/SR3pywUjHVJl3hb" Content-Disposition: inline In-Reply-To: <87ed7qvhn3.fsf@gnu.org> 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.91 X-Spam-Score: -3.91 X-Migadu-Queue-Id: BCA9274434 X-Migadu-Scanner: mx11.migadu.com X-TUID: 8IQtlIfaApuv --/SR3pywUjHVJl3hb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Ludo', On 2024-07-18 17:34:08 +0200, Ludovic Court=C3=A8s wrote: > Hi Tomas, > > Tomas Volf <~@wolfsden.cz> skribis: > > > when I try to use the above, it returns wrong module. The module retur= ned is > > prefixed by #{.}# symbol. Full reproducer: > > > > (define-module (xx) > > #:use-module (guix) > > #:use-module (guix modules) > > #:use-module (guix utils)) > > > > (define-public pkg > > (package > > (name "foo") > > (version #f) > > (source #f) > > (build-system #f) > > (synopsis #f) > > (description #f) > > (license #f) > > (home-page #f))) > > > > (pk (file-name->module-name (location-file (package-location pkg)))) > > > > Now just run it: > > > > $ GUILE_AUTO_COMPILE=3D0 guile -L . -c '(use-modules (xx))' > > > > ;;; ((#{.}# xx)) > > > > Notice that the module is not just (xx) as it should have been. > > Oh, good catch. > > I went ahead and pushed a fix as > e3dfed59d39ac60dd2e2b9ef9f4ef63a2a081f41. Let me know if you find > anything wrong! Thank you for the fix. I can confirm (using the original reproducer) that = it works when run from guix repl: $ GUILE_AUTO_COMPILE=3D0 guix repl -qL . GNU Guile 3.0.9 Copyright (C) 1995-2023 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guix-user)> ,use (xx) ;;; ((xx)) However there seem to be few more edge cases that are still not working. Dot multiple times: $ GUILE_AUTO_COMPILE=3D0 guix repl -qL ././. GNU Guile 3.0.9 Copyright (C) 1995-2023 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guix-user)> ,use (xx) ;;; ((#{.}# #{.}# xx)) Double-dot: $ GUILE_AUTO_COMPILE=3D0 guix repl -qL ../tmp GNU Guile 3.0.9 Copyright (C) 1995-2023 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guix-user)> ,use (xx) ;;; ((.. tmp xx)) Should I report those as separate bugs? Or do you think I should just re-o= pen this one? Side-note: I have to say I am confused about behavior of guix repl with /dev/stdin. Everything seems to work there: $ echo '(use-modules (xx))' | GUILE_AUTO_COMPILE=3D0 guix repl -L . /de= v/stdin ;;; ((xx)) $ echo '(use-modules (xx))' | GUILE_AUTO_COMPILE=3D0 guix repl -L ././.= /dev/stdin ;;; ((xx)) $ echo '(use-modules (xx))' | GUILE_AUTO_COMPILE=3D0 guix repl -L ../tm= p /dev/stdin ;;; ((xx)) I have no idea why. I would also try -c as I did in my original reproduces= , but guix repl does not support it (I wonder why). For completeness' sake I am including original message I wrote before trying `guix repl' and therefore writing the above text instead: However I am unsure whether it works. I pulled the Guix channel: $ guix describe Generation 1 Jul 18 2024 18:44:20 (current) guix e3dfed5 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: e3dfed59d39ac60dd2e2b9ef9f4ef63a2a081f41 As far as I can tell that commit should include your fix (or even better, t= hat commit is your fix). However when I try the reproducer from the original b= ug report, I am still getting: $ GUILE_AUTO_COMPILE=3D0 guile -L . -c '(use-modules (xx))' ;;; ((#{.}# xx)) > > Thanks, > Ludo=E2=80=99. -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --/SR3pywUjHVJl3hb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmaZh1sACgkQL7/ufbZ/ wakNxA//VtvQ8D+Y8lvMDhu/GX6LLZyDybDNc05i0zv5KJh9XL92C2K0GvCDUE1Y G7gYo5G0MRBxbQV/Ze3ju56bDdGitTqSkxAuDNlujP7uQkCBEqJ6xfmzUPskUt8z gDciLibxIPBFql4vC0keN2L0nPas6HmluiwyLF1A4lVjbHQYnS7Hf9iQOQXjURHL Lwfad49U7CpXH1Hrt/LW/swDQMhF+WsXfErdw+fZ/l3ptAc7Yesd1fR9QqospKzd cqcp9Ed9GTP6TG/BTBE7y3XehwbXwFLIklWZuieRv4AwMIPDRH5IAIuIvlur0nm3 f7QcB3aHKsg4MFbsX/2agWEV8GpgaO/o7vKBaAvaKEdknijiVIHGYlEuL0HtxJye kYuB1fPCwVTjEjnc6loxiPkPVyE3gP3U8Hnwm6siLp3KwUbtXVjEWXhhA1D8hjJY 1daPHv8AYO2XqXzuvTqxfsL0VHAVMqy+uTJPOfa/eF5JVV14uSy8aL+IWwtaCIKe HnCEIWdG4dqg9yR7C4CLxz0PyHvcte6WwrYcdTr7VELuUNaftTH6jts58Z+zd2ag Bw8foMvoM09Ubbq5Ezsp/dTtodIr4HNqlbp/VeATmUuFiPaTcCxyzzjj/yodJGnz 7U9Exp15SO0eVN5sYykIreD12NEYQU3uHqMmEtNPfb0a3FdDVPU= =jG/Z -----END PGP SIGNATURE----- --/SR3pywUjHVJl3hb--