X-Loop: help-debbugs@HIDDEN 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" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sun, 07 Jul 2024 16:17:02 +0000 Resent-Message-ID: <handler.71979.B.172036898514596 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 71979 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 71979 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guix@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.172036898514596 (code B ref -1); Sun, 07 Jul 2024 16:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2024 16:16:25 +0000 Received: from localhost ([127.0.0.1]:49019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sQUYr-0003nL-1C for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:40148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sQUYo-0003nD-MR for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:23 -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 <~@wolfsden.cz>) id 1sQUYj-0001AT-Uv for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sQUYh-0007Bs-Ne for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id AA45684BD; Sun, 7 Jul 2024 16:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368972; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=YyS49jgFHvQii3vtiRBl6mAZNar3ZDvSPhAjBI5GMqQqj88gzZSRytizquSz07+Id eG1T5kNyPfL8A2oSdcGIoSDwenvaHNh+HGHoL9K2hp0EduI0ctOXYBFevHSvwgBgZB jwNgcrBsVLbNgKQSCrMjCfIS8GFFEd+pIP6FfUL3oFTMkR1P0rZQ0PlWdE566ko6mX vzO8i2s/C+ZwmiiykAWc4veZlIAWQ+LQHI5eyil0IR5DF2LK+7SuP2vMQZcH4areTZ ERFird7pRUzb0xtyC18N483+4dOt1M6/Do264mNraUXlLwQCrjqeTEN4M/Sn4BUYI1 2fVWlMc69Bdk7uhWYHeX6LAygGIzWtQ5h19x2R1LLSmUi7yvH6M74qrJRsfBrdjRD+ 1llqqlbCohuVwvJtksVYj/bdNFwGpgGhKg5GziFhWXYUKp+3kx2Lm16B9AueIXxRTu BttnNldEgwy+E33npU5sGFsbQPwvFGoBmIQ313/yVRvWKbXnD867caj+unShZm8JmB CfGPX+7NmnKyRrBFodfhVV6lfk4RtFrVIFc9A8sKDQs2KA8NWCKE87wQIgrajBJpwu qa8ZLrvBPK+60tCFVNzEIirec+/ZZgqCbGCuOl+cydz2WOEsH7dYEUo+HLo4REyqQo 5qDNQkyT+21EkzFF0uUd65wU= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id D7AC09038 for <bug-guix@HIDDEN>; Sun, 7 Jul 2024 16:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368971; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=jDyKsI5XXPskijP2OVw+1kDqRvj4b20096Cp6w7Ue1m++tsS6/edig3xowP+Lse3c 6cCIsfl38msBq1Js3D6vbVTHNhT8JM5/e2OVd4dwpSRb8BMhyBMRNP08pAnwjxzrbR 73vSQOmgjfHC8y/zF1737EixkI3e2Cqcw8+mBEzvsXq8IF/XGh6ihs8H2xE8OvJm1U KTn5hyFfwcY7MKl3KHDKzGAZx2k9rt5RR0UZ2Qnmf1IRAO97l4jQEElHlKzCcXnskR UQ+yhANPzp728jgtWlp2CSlXfcfeXsa93j7ExjcsSdpOaoRXElOQ7w0owG5744ZqEd rDekjd/QMf5Bhly1756OcAsTFc6Z8I7lI0vUM1/gIZ210VVKd7amoYe0Vl4+5NLvIz 4f7GMdqB8TZsGrKiAKKLhvGIehBvCCL4+DgrCAICdANYkicHO7AMdKIa+j1oMPXJ0a D3rz3WfusauyOTTcRODAs7sIr9cm4erZveBUQnq3o6B8Sr69itucpkUqptvQIQ221r 9LTkvvFn8HL1yWp13ssFrmf9vbckS1XIBj1QYVaOe6fph5/BP+7RutVkm/0BOup7py PRdF/2sKCoEJdvctsEGlOoctScFdeljyqPP+aUGKwgq7a8zF5o45BWk2iQiX34jd16 UU1U/JfektBYexmi7Ihpa2Gw= Date: Sun, 7 Jul 2024 18:16:10 +0200 From: Tomas Volf <~@wolfsden.cz> Message-ID: <Zoq_SpbfnQSd4S-1@ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GoiQVJScH/rRBXIl" Content-Disposition: inline Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --GoiQVJScH/rRBXIl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, when I try to use the above, it returns wrong module. The module returned 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=0 guile -L . -c '(use-modules (xx))' ;;; ((#{.}# xx)) Notice that the module is not just (xx) as it should have been. The impact of this bug is broken guix pull for my channel (I will work around it somehow, I hope) but still it would be nice if it worked properly, hence this report. Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --GoiQVJScH/rRBXIl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmaKv0oACgkQL7/ufbZ/ wak5XRAAmwnC+HrQOOVvhbtHQcWvexqlrdPjsBDE6UFdlVP3Eq+8nzdPnuI/mhfa au1muqAC8wJfl1n/dQ+jGVIpt26SGT0TMEHjV+jtJIPvD3zOwZtKivxoVuUrO9Ou Vboek075m2LL4r3vcxL2DbjY4wmmE6jvrhJBdVxFxw1utURHjwPoJmVwzh/R1O46 EkmWccbUIQv51JgNC0XOEcsD99wQiOHTIRp4Fierh8MwAsDwMl3bO0xxYl5ppcJg lKdxympnpwt7IB2IiVXYgIQesVmnz1IZ9WuEqS9UNvw9ygaSvLqDOxtzGtRoQj9F Fcz+2YJrNMuXDBsmPP+g+oKZAhlPmrbVglpCBMdl4ncSoQUZyeS9u6IPRC+/ihNW nY/8lwKauEmEXAvEXw9NqrEqEcxW+8zvUed4psJZBA0SnjOedPMp0/auMQ1IJtV9 NqGv1M3fpZcJitcgIUvtoWNvl7MFwjD4945ned8Euul9VZB1/r3xXhp3gQ4ULDi7 UEe54fkD++cJtUObDuHHZL1DWjNyPBO2Y6X4rWDuYBQ7CL/+CzCOF93yXdifNd05 C0r53c2CHF4AgTNe4o8rUXWVUEcVGQFVBlVKgzn6sjNOwUr6XaKWu2W2X8sEYL9G T5laJY7C1Igzkm6v87ubfW+qIUMU3nLwVEcToC5OTyJzX8O7g9s= =dF7L -----END PGP SIGNATURE----- --GoiQVJScH/rRBXIl--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Tomas Volf <~@wolfsden.cz> Subject: bug#71979: Acknowledgement ((file-name->module-name (location-file (package-location pkg))) returns wrong module) Message-ID: <handler.71979.B.172036898514596.ack <at> debbugs.gnu.org> References: <Zoq_SpbfnQSd4S-1@ws> X-Gnu-PR-Message: ack 71979 X-Gnu-PR-Package: guix Reply-To: 71979 <at> debbugs.gnu.org Date: Sun, 07 Jul 2024 16:17:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 71979 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 71979: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71979 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: bug#71979: closed ((file-name->module-name (location-file (package-location pkg))) returns wrong module) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.71979.D71979.172131686522864.ackdone <at> debbugs.gnu.org> References: <87ed7qvhn3.fsf@HIDDEN> <Zoq_SpbfnQSd4S-1@ws> X-Gnu-PR-Message: closed 71979 X-Gnu-PR-Package: guix Date: Thu, 18 Jul 2024 15:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1721316902-22951-0" This is a multi-part message in MIME format... ------------=_1721316902-22951-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Thu, 18 Jul 2024 17:34:08 +0200 with message-id <87ed7qvhn3.fsf@HIDDEN> and subject line Re: bug#71979: (file-name->module-name (location-file (pac= kage-location pkg))) returns wrong module has caused the debbugs.gnu.org bug report #71979, regarding (file-name->module-name (location-file (package-location pkg))) r= eturns wrong module to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 71979: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71979 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1721316902-22951-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jul 2024 16:16:25 +0000 Received: from localhost ([127.0.0.1]:49019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sQUYr-0003nL-1C for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:40148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sQUYo-0003nD-MR for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:23 -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 <~@wolfsden.cz>) id 1sQUYj-0001AT-Uv for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sQUYh-0007Bs-Ne for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id AA45684BD; Sun, 7 Jul 2024 16:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368972; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=YyS49jgFHvQii3vtiRBl6mAZNar3ZDvSPhAjBI5GMqQqj88gzZSRytizquSz07+Id eG1T5kNyPfL8A2oSdcGIoSDwenvaHNh+HGHoL9K2hp0EduI0ctOXYBFevHSvwgBgZB jwNgcrBsVLbNgKQSCrMjCfIS8GFFEd+pIP6FfUL3oFTMkR1P0rZQ0PlWdE566ko6mX vzO8i2s/C+ZwmiiykAWc4veZlIAWQ+LQHI5eyil0IR5DF2LK+7SuP2vMQZcH4areTZ ERFird7pRUzb0xtyC18N483+4dOt1M6/Do264mNraUXlLwQCrjqeTEN4M/Sn4BUYI1 2fVWlMc69Bdk7uhWYHeX6LAygGIzWtQ5h19x2R1LLSmUi7yvH6M74qrJRsfBrdjRD+ 1llqqlbCohuVwvJtksVYj/bdNFwGpgGhKg5GziFhWXYUKp+3kx2Lm16B9AueIXxRTu BttnNldEgwy+E33npU5sGFsbQPwvFGoBmIQ313/yVRvWKbXnD867caj+unShZm8JmB CfGPX+7NmnKyRrBFodfhVV6lfk4RtFrVIFc9A8sKDQs2KA8NWCKE87wQIgrajBJpwu qa8ZLrvBPK+60tCFVNzEIirec+/ZZgqCbGCuOl+cydz2WOEsH7dYEUo+HLo4REyqQo 5qDNQkyT+21EkzFF0uUd65wU= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id D7AC09038 for <bug-guix@HIDDEN>; Sun, 7 Jul 2024 16:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368971; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=jDyKsI5XXPskijP2OVw+1kDqRvj4b20096Cp6w7Ue1m++tsS6/edig3xowP+Lse3c 6cCIsfl38msBq1Js3D6vbVTHNhT8JM5/e2OVd4dwpSRb8BMhyBMRNP08pAnwjxzrbR 73vSQOmgjfHC8y/zF1737EixkI3e2Cqcw8+mBEzvsXq8IF/XGh6ihs8H2xE8OvJm1U KTn5hyFfwcY7MKl3KHDKzGAZx2k9rt5RR0UZ2Qnmf1IRAO97l4jQEElHlKzCcXnskR UQ+yhANPzp728jgtWlp2CSlXfcfeXsa93j7ExjcsSdpOaoRXElOQ7w0owG5744ZqEd rDekjd/QMf5Bhly1756OcAsTFc6Z8I7lI0vUM1/gIZ210VVKd7amoYe0Vl4+5NLvIz 4f7GMdqB8TZsGrKiAKKLhvGIehBvCCL4+DgrCAICdANYkicHO7AMdKIa+j1oMPXJ0a D3rz3WfusauyOTTcRODAs7sIr9cm4erZveBUQnq3o6B8Sr69itucpkUqptvQIQ221r 9LTkvvFn8HL1yWp13ssFrmf9vbckS1XIBj1QYVaOe6fph5/BP+7RutVkm/0BOup7py PRdF/2sKCoEJdvctsEGlOoctScFdeljyqPP+aUGKwgq7a8zF5o45BWk2iQiX34jd16 UU1U/JfektBYexmi7Ihpa2Gw= Date: Sun, 7 Jul 2024 18:16:10 +0200 From: Tomas Volf <~@wolfsden.cz> To: bug-guix@HIDDEN Subject: (file-name->module-name (location-file (package-location pkg))) returns wrong module Message-ID: <Zoq_SpbfnQSd4S-1@ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GoiQVJScH/rRBXIl" Content-Disposition: inline Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --GoiQVJScH/rRBXIl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, when I try to use the above, it returns wrong module. The module returned 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=0 guile -L . -c '(use-modules (xx))' ;;; ((#{.}# xx)) Notice that the module is not just (xx) as it should have been. The impact of this bug is broken guix pull for my channel (I will work around it somehow, I hope) but still it would be nice if it worked properly, hence this report. Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --GoiQVJScH/rRBXIl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmaKv0oACgkQL7/ufbZ/ wak5XRAAmwnC+HrQOOVvhbtHQcWvexqlrdPjsBDE6UFdlVP3Eq+8nzdPnuI/mhfa au1muqAC8wJfl1n/dQ+jGVIpt26SGT0TMEHjV+jtJIPvD3zOwZtKivxoVuUrO9Ou Vboek075m2LL4r3vcxL2DbjY4wmmE6jvrhJBdVxFxw1utURHjwPoJmVwzh/R1O46 EkmWccbUIQv51JgNC0XOEcsD99wQiOHTIRp4Fierh8MwAsDwMl3bO0xxYl5ppcJg lKdxympnpwt7IB2IiVXYgIQesVmnz1IZ9WuEqS9UNvw9ygaSvLqDOxtzGtRoQj9F Fcz+2YJrNMuXDBsmPP+g+oKZAhlPmrbVglpCBMdl4ncSoQUZyeS9u6IPRC+/ihNW nY/8lwKauEmEXAvEXw9NqrEqEcxW+8zvUed4psJZBA0SnjOedPMp0/auMQ1IJtV9 NqGv1M3fpZcJitcgIUvtoWNvl7MFwjD4945ned8Euul9VZB1/r3xXhp3gQ4ULDi7 UEe54fkD++cJtUObDuHHZL1DWjNyPBO2Y6X4rWDuYBQ7CL/+CzCOF93yXdifNd05 C0r53c2CHF4AgTNe4o8rUXWVUEcVGQFVBlVKgzn6sjNOwUr6XaKWu2W2X8sEYL9G T5laJY7C1Igzkm6v87ubfW+qIUMU3nLwVEcToC5OTyJzX8O7g9s= =dF7L -----END PGP SIGNATURE----- --GoiQVJScH/rRBXIl-- ------------=_1721316902-22951-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71979-done) by debbugs.gnu.org; 18 Jul 2024 15:34:25 +0000 Received: from localhost ([127.0.0.1]:37913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sUT9E-0005wi-NT for submit <at> debbugs.gnu.org; Thu, 18 Jul 2024 11:34:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1sUT9C-0005wU-6G for 71979-done <at> debbugs.gnu.org; Thu, 18 Jul 2024 11:34:23 -0400 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 <ludo@HIDDEN>) id 1sUT92-0002eH-3b; Thu, 18 Jul 2024 11:34:12 -0400 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=eLkkD11o4CKX4V+Wt1AFHX3lIve1fyhwm1JKXl0aUVM=; b=Zu0y4lhjpyb80e6URqei TUVl+iplnoXV1T6xCxuCv7/lVfZ14/wwDIk9j4KW67OYQeFXb/gevMWxu5p8mtJcUd6O98QHUgcQU MtUlixlq8auqpi0v4t5C5r+cJFeNnTINPEN4rpNBcJHN9bStjL1I4D+CH2LB5B8aT6zZ+Jqn/Kpx9 vNY3bNL8p/8ADfRzwONaZaPyx0Q/j84ikwF0jY6qwxMe1H2w51m+boLdWDmcKtSp7eG7+s+XsBgXg WYsgwn6outCduSP4ioYeADKTubhbpHgujf7pv432kJuKMXVYYrc9+eu3OS3JxIc3Xpl5H4WqGCeJz 2wYqtgvBvCHq/g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Tomas Volf <~@wolfsden.cz> Subject: Re: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module In-Reply-To: <Zoq_SpbfnQSd4S-1@ws> (Tomas Volf's message of "Sun, 7 Jul 2024 18:16:10 +0200") References: <Zoq_SpbfnQSd4S-1@ws> Date: Thu, 18 Jul 2024 17:34:08 +0200 Message-ID: <87ed7qvhn3.fsf@HIDDEN> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71979-done Cc: 71979-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Tomas, Tomas Volf <~@wolfsden.cz> skribis: > when I try to use the above, it returns wrong module. The module returne= d 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! Thanks, Ludo=E2=80=99. ------------=_1721316902-22951-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Tomas Volf <~@wolfsden.cz> Subject: bug#71979: closed (Re: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module) Message-ID: <handler.71979.D71979.172131686522864.notifdone <at> debbugs.gnu.org> References: <87ed7qvhn3.fsf@HIDDEN> <Zoq_SpbfnQSd4S-1@ws> X-Gnu-PR-Message: they-closed 71979 X-Gnu-PR-Package: guix Reply-To: 71979 <at> debbugs.gnu.org Date: Thu, 18 Jul 2024 15:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1721316902-22951-1" This is a multi-part message in MIME format... ------------=_1721316902-22951-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #71979: (file-name->module-name (location-file (package-location pkg))) ret= urns wrong module which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 71979 <at> debbugs.gnu.org. --=20 71979: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71979 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1721316902-22951-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71979-done) by debbugs.gnu.org; 18 Jul 2024 15:34:25 +0000 Received: from localhost ([127.0.0.1]:37913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sUT9E-0005wi-NT for submit <at> debbugs.gnu.org; Thu, 18 Jul 2024 11:34:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1sUT9C-0005wU-6G for 71979-done <at> debbugs.gnu.org; Thu, 18 Jul 2024 11:34:23 -0400 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 <ludo@HIDDEN>) id 1sUT92-0002eH-3b; Thu, 18 Jul 2024 11:34:12 -0400 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=eLkkD11o4CKX4V+Wt1AFHX3lIve1fyhwm1JKXl0aUVM=; b=Zu0y4lhjpyb80e6URqei TUVl+iplnoXV1T6xCxuCv7/lVfZ14/wwDIk9j4KW67OYQeFXb/gevMWxu5p8mtJcUd6O98QHUgcQU MtUlixlq8auqpi0v4t5C5r+cJFeNnTINPEN4rpNBcJHN9bStjL1I4D+CH2LB5B8aT6zZ+Jqn/Kpx9 vNY3bNL8p/8ADfRzwONaZaPyx0Q/j84ikwF0jY6qwxMe1H2w51m+boLdWDmcKtSp7eG7+s+XsBgXg WYsgwn6outCduSP4ioYeADKTubhbpHgujf7pv432kJuKMXVYYrc9+eu3OS3JxIc3Xpl5H4WqGCeJz 2wYqtgvBvCHq/g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Tomas Volf <~@wolfsden.cz> Subject: Re: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module In-Reply-To: <Zoq_SpbfnQSd4S-1@ws> (Tomas Volf's message of "Sun, 7 Jul 2024 18:16:10 +0200") References: <Zoq_SpbfnQSd4S-1@ws> Date: Thu, 18 Jul 2024 17:34:08 +0200 Message-ID: <87ed7qvhn3.fsf@HIDDEN> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71979-done Cc: 71979-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Tomas, Tomas Volf <~@wolfsden.cz> skribis: > when I try to use the above, it returns wrong module. The module returne= d 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! Thanks, Ludo=E2=80=99. ------------=_1721316902-22951-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jul 2024 16:16:25 +0000 Received: from localhost ([127.0.0.1]:49019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sQUYr-0003nL-1C for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:40148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sQUYo-0003nD-MR for submit <at> debbugs.gnu.org; Sun, 07 Jul 2024 12:16:23 -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 <~@wolfsden.cz>) id 1sQUYj-0001AT-Uv for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sQUYh-0007Bs-Ne for bug-guix@HIDDEN; Sun, 07 Jul 2024 12:16:17 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id AA45684BD; Sun, 7 Jul 2024 16:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368972; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=YyS49jgFHvQii3vtiRBl6mAZNar3ZDvSPhAjBI5GMqQqj88gzZSRytizquSz07+Id eG1T5kNyPfL8A2oSdcGIoSDwenvaHNh+HGHoL9K2hp0EduI0ctOXYBFevHSvwgBgZB jwNgcrBsVLbNgKQSCrMjCfIS8GFFEd+pIP6FfUL3oFTMkR1P0rZQ0PlWdE566ko6mX vzO8i2s/C+ZwmiiykAWc4veZlIAWQ+LQHI5eyil0IR5DF2LK+7SuP2vMQZcH4areTZ ERFird7pRUzb0xtyC18N483+4dOt1M6/Do264mNraUXlLwQCrjqeTEN4M/Sn4BUYI1 2fVWlMc69Bdk7uhWYHeX6LAygGIzWtQ5h19x2R1LLSmUi7yvH6M74qrJRsfBrdjRD+ 1llqqlbCohuVwvJtksVYj/bdNFwGpgGhKg5GziFhWXYUKp+3kx2Lm16B9AueIXxRTu BttnNldEgwy+E33npU5sGFsbQPwvFGoBmIQ313/yVRvWKbXnD867caj+unShZm8JmB CfGPX+7NmnKyRrBFodfhVV6lfk4RtFrVIFc9A8sKDQs2KA8NWCKE87wQIgrajBJpwu qa8ZLrvBPK+60tCFVNzEIirec+/ZZgqCbGCuOl+cydz2WOEsH7dYEUo+HLo4REyqQo 5qDNQkyT+21EkzFF0uUd65wU= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id D7AC09038 for <bug-guix@HIDDEN>; Sun, 7 Jul 2024 16:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1720368971; bh=Sus+p3/APi73tdtt25IWo4suhIl8D5F1pnd8FHbXFTw=; h=Date:From:To:Subject; b=jDyKsI5XXPskijP2OVw+1kDqRvj4b20096Cp6w7Ue1m++tsS6/edig3xowP+Lse3c 6cCIsfl38msBq1Js3D6vbVTHNhT8JM5/e2OVd4dwpSRb8BMhyBMRNP08pAnwjxzrbR 73vSQOmgjfHC8y/zF1737EixkI3e2Cqcw8+mBEzvsXq8IF/XGh6ihs8H2xE8OvJm1U KTn5hyFfwcY7MKl3KHDKzGAZx2k9rt5RR0UZ2Qnmf1IRAO97l4jQEElHlKzCcXnskR UQ+yhANPzp728jgtWlp2CSlXfcfeXsa93j7ExjcsSdpOaoRXElOQ7w0owG5744ZqEd rDekjd/QMf5Bhly1756OcAsTFc6Z8I7lI0vUM1/gIZ210VVKd7amoYe0Vl4+5NLvIz 4f7GMdqB8TZsGrKiAKKLhvGIehBvCCL4+DgrCAICdANYkicHO7AMdKIa+j1oMPXJ0a D3rz3WfusauyOTTcRODAs7sIr9cm4erZveBUQnq3o6B8Sr69itucpkUqptvQIQ221r 9LTkvvFn8HL1yWp13ssFrmf9vbckS1XIBj1QYVaOe6fph5/BP+7RutVkm/0BOup7py PRdF/2sKCoEJdvctsEGlOoctScFdeljyqPP+aUGKwgq7a8zF5o45BWk2iQiX34jd16 UU1U/JfektBYexmi7Ihpa2Gw= Date: Sun, 7 Jul 2024 18:16:10 +0200 From: Tomas Volf <~@wolfsden.cz> To: bug-guix@HIDDEN Subject: (file-name->module-name (location-file (package-location pkg))) returns wrong module Message-ID: <Zoq_SpbfnQSd4S-1@ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GoiQVJScH/rRBXIl" Content-Disposition: inline Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --GoiQVJScH/rRBXIl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, when I try to use the above, it returns wrong module. The module returned 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=0 guile -L . -c '(use-modules (xx))' ;;; ((#{.}# xx)) Notice that the module is not just (xx) as it should have been. The impact of this bug is broken guix pull for my channel (I will work around it somehow, I hope) but still it would be nice if it worked properly, hence this report. Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --GoiQVJScH/rRBXIl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmaKv0oACgkQL7/ufbZ/ wak5XRAAmwnC+HrQOOVvhbtHQcWvexqlrdPjsBDE6UFdlVP3Eq+8nzdPnuI/mhfa au1muqAC8wJfl1n/dQ+jGVIpt26SGT0TMEHjV+jtJIPvD3zOwZtKivxoVuUrO9Ou Vboek075m2LL4r3vcxL2DbjY4wmmE6jvrhJBdVxFxw1utURHjwPoJmVwzh/R1O46 EkmWccbUIQv51JgNC0XOEcsD99wQiOHTIRp4Fierh8MwAsDwMl3bO0xxYl5ppcJg lKdxympnpwt7IB2IiVXYgIQesVmnz1IZ9WuEqS9UNvw9ygaSvLqDOxtzGtRoQj9F Fcz+2YJrNMuXDBsmPP+g+oKZAhlPmrbVglpCBMdl4ncSoQUZyeS9u6IPRC+/ihNW nY/8lwKauEmEXAvEXw9NqrEqEcxW+8zvUed4psJZBA0SnjOedPMp0/auMQ1IJtV9 NqGv1M3fpZcJitcgIUvtoWNvl7MFwjD4945ned8Euul9VZB1/r3xXhp3gQ4ULDi7 UEe54fkD++cJtUObDuHHZL1DWjNyPBO2Y6X4rWDuYBQ7CL/+CzCOF93yXdifNd05 C0r53c2CHF4AgTNe4o8rUXWVUEcVGQFVBlVKgzn6sjNOwUr6XaKWu2W2X8sEYL9G T5laJY7C1Igzkm6v87ubfW+qIUMU3nLwVEcToC5OTyJzX8O7g9s= =dF7L -----END PGP SIGNATURE----- --GoiQVJScH/rRBXIl-- ------------=_1721316902-22951-1--
X-Loop: help-debbugs@HIDDEN 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" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Thu, 18 Jul 2024 21:22:01 +0000 Resent-Message-ID: <handler.71979.B71979.172133770525700 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 71979 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Cc: 71979 <at> debbugs.gnu.org Received: via spool by 71979-submit <at> 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sUYZN-0006gR-A3 for submit <at> 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 <at> 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= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 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: <ZpmHXCnJIhmjFftx@ws> References: <Zoq_SpbfnQSd4S-1@ws> <87ed7qvhn3.fsf@HIDDEN> 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@HIDDEN> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --/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--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.