From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +FDOKTc2mWZvgAEA62LTzQ:P1 (envelope-from ) for ; Thu, 18 Jul 2024 15:35:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id +FDOKTc2mWZvgAEA62LTzQ (envelope-from ) for ; Thu, 18 Jul 2024 17:35:19 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Zu0y4lhj; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721316919; 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: content-transfer-encoding:content-transfer-encoding:resent-to: 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=eLkkD11o4CKX4V+Wt1AFHX3lIve1fyhwm1JKXl0aUVM=; b=FmTOuOYLPp1yWMKndUejnboVO3nuTf3OlQ3i1PRf/2Qfyc0nH4QtCmasC46MmUOM32O+kd wZ+CEf/Uz5nCz+SFzd04pavzeN78F3W9S+eW9PeiSiFQcdlsb6ktjKqRGg2vmXuBwbNnmS cHsBAfmpaSwkgLrPkwKi31ujCTywD60iShmlsrkH4JJBF2QiZvLs4bx7ZsPSTHw68tst3Q DZBof95TVNVYFFuoByQ10rPUE7mwuv9PK6PILfZqUxpCCuVyyQBcsnJ+RMjmWqPwva6C5L WEvhcOMJMU6XeUSXGvKwJrTGJcOyzAJE/IrAQ1P9PHwKVNg0guc9LNfRmMwKow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Zu0y4lhj; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721316919; a=rsa-sha256; cv=none; b=nVrxXQPWBe3G9dNcvU8dvA6q55c9euGHcnRdQzjCwGPAWzVweTLunud8G7tBdWCCaJMO6q 42uphVi+dBmB8YwQhIlunevSdvNZuoVhdOwy5BtLC/Fnnrxmh4sVx01nSCT41hjkyePMJX JrflqwBoJ8y14AOJiI9VEnc39qzPO9tqpEHydsUd5TRrz/vZZfs6GM7v5MaHaniovMXxNZ +0d6g7QlR+v7EKA14DjxLLVb0cQOuGbbNPKIycTg/492Cup4jkwLxREEJtmfe7uAWpBQnB G9eX3Cn3oLJ4wSCJ/TieMN33Lzn1H4Q+Ep7Ed6Bpmg3xMZQj9sUT9Fd1Ft1Qvg== 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 8FF9911EB9 for ; Thu, 18 Jul 2024 17:35:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUT9o-0002cf-Lr; Thu, 18 Jul 2024 11:35:00 -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 1sUT9m-0002VG-V1 for bug-guix@gnu.org; Thu, 18 Jul 2024 11:34: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 1sUT9m-0002l4-MP for bug-guix@gnu.org; Thu, 18 Jul 2024 11:34:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUT9q-0005yH-CR for bug-guix@gnu.org; Thu, 18 Jul 2024 11:35:02 -0400 Subject: bug#71979: (file-name->module-name (location-file (package-location pkg))) returns wrong module Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Thu, 18 Jul 2024 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 71979 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tomas Volf <~@wolfsden.cz> Cc: 71979-done@debbugs.gnu.org Mail-Followup-To: 71979@debbugs.gnu.org, ludo@gnu.org, ~@wolfsden.cz Received: via spool by 71979-done@debbugs.gnu.org id=D71979.172131686522864 (code D ref 71979); Thu, 18 Jul 2024 15:35:02 +0000 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 ) id 1sUT9E-0005wi-NT for submit@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 ) id 1sUT9C-0005wU-6G for 71979-done@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 ) 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Tomas Volf's message of "Sun, 7 Jul 2024 18:16:10 +0200") References: Date: Thu, 18 Jul 2024 17:34:08 +0200 Message-ID: <87ed7qvhn3.fsf@gnu.org> 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-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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 8FF9911EB9 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -7.31 X-Spam-Score: -7.31 X-TUID: MFneGMi6L/hA 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.