no output for guix package -f when the file evaluates to nothing

DoneSubmitted by Julien Lepiller.
Details
2 participants
  • Julien Lepiller
  • Ludovic Courtès
Owner
unassigned
Severity
normal
J
J
Julien Lepiller wrote on 11 Jul 2019 11:31
(address . bug-guix@gnu.org)
D62FD64C-F99A-4D36-8DCB-9D2DED3F3A74@lepiller.eu
Users tend to copy what they see in our code base, so it's not rare to have to help them realise that if their last statement is (define-public ...), the file doesn't evaluate to a package.

Running guix build -f mypackage.scm at least gives an error saying it doesn't know how to compile #<unspecified>.

Running guix package -f mypackage.scm returns immediately with no error message and a status of 0, but doesn't actually build or install anything. You can even try with an empty file :)

There should be an error message, and probably even a hint.
L
L
Ludovic Courtès wrote on 11 Jul 2019 23:23
control message for bug #36592
(address . control@debbugs.gnu.org)
8736jcp8p5.fsf@gnu.org
tags 36592 + easy
quit
L
L
Ludovic Courtès wrote on 20 Sep 2019 09:42
Re: bug#36592: no output for guix package -f when the file evaluates to nothing
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 36592-done@debbugs.gnu.org)
87mueztnvl.fsf@gnu.org
Hello,

Julien Lepiller <julien@lepiller.eu> skribis:

Toggle quote (8 lines)
> Users tend to copy what they see in our code base, so it's not rare to have to help them realise that if their last statement is (define-public ...), the file doesn't evaluate to a package.
>
> Running guix build -f mypackage.scm at least gives an error saying it doesn't know how to compile #<unspecified>.
>
> Running guix package -f mypackage.scm returns immediately with no error message and a status of 0, but doesn't actually build or install anything. You can even try with an empty file :)
>
> There should be an error message, and probably even a hint.

Fixed in f9c0400392843540a87985a67ffb9fb6e4dbc2fa. It doesn’t provide a
hint though.

I thought we may want to provide ‘load*’ a type predicate that it would
check, so that it can say “got #<undefined>, expected <package>”.
However, we’d need a contract rather than a mere predicate to have nice
error reporting, so I decided to punt on this for now.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 36592@debbugs.gnu.org