all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 36592-done@debbugs.gnu.org
Subject: bug#36592: no output for guix package -f when the file evaluates to nothing
Date: Fri, 20 Sep 2019 09:42:22 +0200	[thread overview]
Message-ID: <87mueztnvl.fsf@gnu.org> (raw)
In-Reply-To: <D62FD64C-F99A-4D36-8DCB-9D2DED3F3A74@lepiller.eu> (Julien Lepiller's message of "Thu, 11 Jul 2019 11:31:04 +0200")

Hello,

Julien Lepiller <julien@lepiller.eu> skribis:

> 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’.

      reply	other threads:[~2019-09-20  7:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11  9:31 bug#36592: no output for guix package -f when the file evaluates to nothing Julien Lepiller
2019-09-20  7:42 ` 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

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

  git send-email \
    --in-reply-to=87mueztnvl.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=36592-done@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.