unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 46390-done@debbugs.gnu.org
Subject: bug#46390: “guix lint -L relative/path foo“ fails
Date: Mon, 22 Feb 2021 12:15:12 +0100	[thread overview]
Message-ID: <87r1l8bbgf.fsf@gnu.org> (raw)
In-Reply-To: <86a6sekwvq.fsf@gmail.com> (zimoun's message of "Mon, 08 Feb 2021 23:39:05 +0100")

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> …but 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 #<procedure 7ff41750b750 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
> In srfi/srfi-1.scm:
>     634:9  9 (for-each #<procedure 7ff4175090e0 at guix/scripts/lint.scm:222:23 (spec)> ("hi"))
> In guix/scripts/lint.scm:
>      65:4  8 (run-checkers #<package hi@2.10 example/hello.scm:8 7ff415cc7dc0> (#<<lint-checker> name: source-file-name descripti…>) …)
> In srfi/srfi-1.scm:
>     634:9  7 (for-each #<procedure 7ff40797f480 at guix/scripts/lint.scm:65:14 (checker)> (#<<lint-checker> name: source-file-name…>))
> In guix/scripts/lint.scm:
>     74:21  6 (_ _)
> In guix/lint.scm:
>     897:9  5 (check-source-file-name _)
>    148:18  4 (%make-warning #<package hi@2.10 example/hello.scm:8 7ff415cc7dc0> "the source file name should contain the package n…" …)
> In ice-9/boot-9.scm:
>   1731:15  3 (with-exception-handler #<procedure 7ff40797f1e0 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
> In ice-9/ports.scm:
>    440:11  2 (call-with-input-file #f #<procedure 7ff40797f120 at guix/packages.scm:482:11 (port)> #: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 ’package-field-location’ in (guix packages):
>
>      (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’.




      reply	other threads:[~2021-02-22 11:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 22:39 bug#46390: “guix lint -L relative/path foo“ fails zimoun
2021-02-22 11:15 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1l8bbgf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=46390-done@debbugs.gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).