From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 08 17:46:59 2021 Received: (at submit) by debbugs.gnu.org; 8 Feb 2021 22:46:59 +0000 Received: from localhost ([127.0.0.1]:52096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9FJ4-0002Qu-NO for submit@debbugs.gnu.org; Mon, 08 Feb 2021 17:46:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:60932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9FJ2-0002Qm-Bl for submit@debbugs.gnu.org; Mon, 08 Feb 2021 17:46:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9FJ0-0003qf-L3 for bug-guix@gnu.org; Mon, 08 Feb 2021 17:46:56 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:33779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9FIr-00013J-SY for bug-guix@gnu.org; Mon, 08 Feb 2021 17:46:52 -0500 Received: by mail-wm1-x32d.google.com with SMTP id a16so733803wmm.0 for ; Mon, 08 Feb 2021 14:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mmAZG+hdamKhmjQ3IZJ/x8TPLLuRnFl75VpBVxBnJfQ=; b=BvZNeE3VetJ1jOuIuVgNLH4RPt2qsV1hIdoYmDHPQaAffDJQXJa1YUjSgnZFqKr8R0 gw4e8iiN6+ALq0kjNAaUlme3Wch94F6TVS04cNf3LvuNMkZcMQf84aypoxX0LHT1aBo8 T7di4LjZ/ogu6jWWN3hNpk9fomy3Z828CVDd2TQXbXoKfGja3islfM4IVkGAIIOWOPX+ r+dDtmJkOOObMusIMDICarH9KHuBq09dvoHL+qBZTcTGxONZkg8ve9xrw3UxFOIMmDhK tVxC8ibOcL6DX2JxAMgMn8abhyK2UGotAZ6yGxeg35EDvLTRUEvy9OF+9X2rhQnboIen xicQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mmAZG+hdamKhmjQ3IZJ/x8TPLLuRnFl75VpBVxBnJfQ=; b=DiAS7QscN8rVvu1IyR8cWQl+vsj1qVIY75Wh0EdsJPrxtPUUs7fBuBTdlaLH10OMik SEdR9A5z2S3VRxPcMNZiAUKqNXtorHtHRplqa1pWnmCDR8PSS0bUipXxl89oJEMnPyQy Za6z/1QTpIQgYeXkg7z7rOBScbIekYbsncRN0Ak4JOy4nyT6s354JZuqlgeWjyuu0qsC m83BVXNdAbntULgog4wnNJ5ZXnP+IB/Fo2TFJGSdhv9+lir4qfW6y+tc2HfsMxkXaqur M3cQphxwbyoPJQSwdQYU0mzLeNUDymOenbx2tueuiJAKsLk/u1eDJXeerDEgPT0XOGPE 3eKg== X-Gm-Message-State: AOAM531TS7y1FGTjiSey1TYGOMgn/Urxsg/82yD984ILY9JsCRN/+KZx 863r8XYCwgfe3PaW0ypEYYV2EokVQBw= X-Google-Smtp-Source: ABdhPJw//LWfo8b/gKG7/TeoFS/T4Q6fy9y2XKmS18cVhp5ywyF508qXITGaLBpv39ZPno2PeWXVag== X-Received: by 2002:a1c:1bc7:: with SMTP id b190mr801699wmb.115.1612824403653; Mon, 08 Feb 2021 14:46:43 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id q6sm29609210wrw.43.2021.02.08.14.46.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 14:46:42 -0800 (PST) From: zimoun To: bug-guix@gnu.org Subject: =?utf-8?Q?=E2=80=9Cguix?= lint -L relative/path =?utf-8?Q?foo?= =?utf-8?Q?=E2=80=9C?= fails Date: Mon, 08 Feb 2021 23:39:05 +0100 Message-ID: <86a6sekwvq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32d.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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@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 (--) Hi, Here an example to reproduce. Everything is fine with the full path=E2=80= =A6 --8<---------------cut here---------------start------------->8--- $ cat /tmp/example/hello.scm (define-module (hello) #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module (guix licenses)) (define-public hi (package (name "hi") (version "2.10") (source (origin (method git-fetch) (uri (git-reference (url "https://example.org/hello-example.git") (commit "e1eefd033b8a2c4c81babc6fde08ebb116c6abb8"))) (sha256 (base32 "1im1gglfm4k10bh4mdaqzmx3lm3kivnsmxrvl6vyvmfqqzljq75l")))) (build-system gnu-build-system) (synopsis "Hello, GNU world: An example GNU package") (description "GNU Hello prints the message \"Hello, world!\" and then exits. It serves as an example of standard GNU coding practices. As such, it supports command-line arguments, multiple languages, and so on.") (home-page "https://www.gnu.org/software/hello/") (license gpl3+))) $ guix lint -L /tmp/example hi -c source-file-name /tmp/example/hello.scm:11:12: hi@2.10 : le nom du fichier source devrait co= ntenir le nom du paquet --8<---------------cut here---------------end--------------->8--- =E2=80=A6but breaks with relative path: --8<---------------cut here---------------start------------->8--- $ cd /tmp/ $ guix lint -L example hi -c source-file-name Backtrace: 13 (primitive-load "/home/sitour/.config/guix/current/bin/guix") In guix/ui.scm: 2150:12 12 (run-guix-command _ . _) In ice-9/boot-9.scm: 1736:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 1731:15 10 (with-exception-handler # _ #:unwind? _ #:unwind-for-type _) In srfi/srfi-1.scm: 634:9 9 (for-each # ("hi")) In guix/scripts/lint.scm: 65:4 8 (run-checkers # (#< name: source-file-name descripti=E2=80=A6>) =E2=80=A6) In srfi/srfi-1.scm: 634:9 7 (for-each # (#< name: source-file-name=E2=80=A6>)) In guix/scripts/lint.scm: 74:21 6 (_ _) In guix/lint.scm: 897:9 5 (check-source-file-name _) 148:18 4 (%make-warning # "the source file name should contain the package n=E2=80=A6" =E2=80=A6) In ice-9/boot-9.scm: 1731:15 3 (with-exception-handler # _ #:unwind? _ #:unwind-for-type _) In ice-9/ports.scm: 440:11 2 (call-with-input-file #f # #:binary _ #:encoding _ # _) In unknown file: 1 (open-file #f "r" #:encoding #f #:guess-encoding #f) In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1669:16: In procedure raise-exception: Wrong type (expecting string): #f --8<---------------cut here---------------end--------------->8--- The reason is from =E2=80=99package-field-location=E2=80=99 in (guix packag= es): --8<---------------cut here---------------start------------->8--- (catch 'system-error (lambda () ;; In general we want to keep relative file names for modules. (call-with-input-file (search-path %load-path file) --8<---------------cut here---------------end--------------->8--- the =E2=80=99search-path=E2=80=99 returns #f. Somehow, the %load-path shou= ld only contain absolute paths and here it is not the case. Therefore, the fix should be in (guix build): --8<---------------cut here---------------start------------->8--- (define %standard-build-options ;; List of standard command-line options for tools that build something. (list (option '(#\L "load-path") #t #f (lambda (opt name arg result . rest) ;; XXX: Imperatively modify the search paths. (%package-module-path (cons arg (%package-module-path))) (%patch-path (cons arg (%patch-path))) (set! %load-path (cons arg %load-path)) (set! %load-compiled-path (cons arg %load-compiled-path)) --8<---------------cut here---------------end--------------->8--- For instance using =E2=80=99canonicalize-path=E2=80=99. All the best, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 22 06:15:26 2021 Received: (at 46390-done) by debbugs.gnu.org; 22 Feb 2021 11:15:26 +0000 Received: from localhost ([127.0.0.1]:55798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lE9BW-0008H5-Az for submit@debbugs.gnu.org; Mon, 22 Feb 2021 06:15:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lE9BQ-0008Gk-Lm for 46390-done@debbugs.gnu.org; Mon, 22 Feb 2021 06:15:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52347) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lE9BL-0007Bs-Hc; Mon, 22 Feb 2021 06:15:15 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42484 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lE9BJ-0000GE-Ce; Mon, 22 Feb 2021 06:15:15 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#46390: =?utf-8?Q?=E2=80=9Cguix?= lint -L relative/path =?utf-8?Q?foo=E2=80=9C?= fails References: <86a6sekwvq.fsf@gmail.com> Date: Mon, 22 Feb 2021 12:15:12 +0100 In-Reply-To: <86a6sekwvq.fsf@gmail.com> (zimoun's message of "Mon, 08 Feb 2021 23:39:05 +0100") Message-ID: <87r1l8bbgf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46390-done Cc: 46390-done@debbugs.gnu.org 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: -1.7 (-) Hi, zimoun skribis: > =E2=80=A6but breaks with relative path: > > $ cd /tmp/ > $ guix lint -L example hi -c source-file-name > Backtrace: > 13 (primitive-load "/home/sitour/.config/guix/current/bin/guix") > In guix/ui.scm: > 2150:12 12 (run-guix-command _ . _) > In ice-9/boot-9.scm: > 1736:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) > 1731:15 10 (with-exception-handler # _ #:unwind? _ #:unwind-for-type _) > In srfi/srfi-1.scm: > 634:9 9 (for-each # ("hi")) > In guix/scripts/lint.scm: > 65:4 8 (run-checkers # (#< name: source-file-name descripti=E2=80=A6>) =E2=80= =A6) > In srfi/srfi-1.scm: > 634:9 7 (for-each # (#< name: source-file-name=E2=80=A6>)) > In guix/scripts/lint.scm: > 74:21 6 (_ _) > In guix/lint.scm: > 897:9 5 (check-source-file-name _) > 148:18 4 (%make-warning # "the source file name should contain the package n=E2=80=A6" =E2=80= =A6) > In ice-9/boot-9.scm: > 1731:15 3 (with-exception-handler # _ #:unwind? _ #:unwind-for-type _) > In ice-9/ports.scm: > 440:11 2 (call-with-input-file #f # #:binary _ #:encoding _ # _) > In unknown file: > 1 (open-file #f "r" #:encoding #f #:guess-encoding #f) > In ice-9/boot-9.scm: > 1669:16 0 (raise-exception _ #:continuable? _) > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > Wrong type (expecting string): #f > > > The reason is from =E2=80=99package-field-location=E2=80=99 in (guix pack= ages): > > (catch 'system-error > (lambda () > ;; In general we want to keep relative file names for modules. > (call-with-input-file (search-path %load-path file) Indeed. Fixed in 9a38bed2cf32e9462badfa43e74cdd4580e804fc. Thanks! Ludo=E2=80=99. From unknown Sat Jun 14 05:31:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 22 Mar 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator