guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43458] [PATCH] guix: build: Add a hint for unspecified value


From: Julien Lepiller
Subject: [bug#43458] [PATCH] guix: build: Add a hint for unspecified value
Date: Wed, 16 Sep 2020 23:40:03 +0200

Hi Guix!

this patch adds a hint to guix build, when you try to build from a file
and it returns #<unspecified>.  The most common error is when you copy
the structure from other guix modules and use `define-public` for your
package. The file returns #<unspecified> and you get this message:

> #<unspecified>: not something we can build.

Which is not very helpful. Here is what happens with this change:

> guix build: error: #<unspecified>: not something we can build
> 
> hint: If you build from a file, make sure the last scheme expression
> returns a package value.  `define-public' defines a variable, but
> returns #<unspecified>.  To fix this, add a scheme expression at the
> end of the file that consists only of the package's variable name you
> defined.  ex:
> 
>      (define-public my-package
>        (package
>          ...))
>      
>      my-package

If instead, you return a value that is not understood, the message is
simpler (as this is not something that happens out of confusion / being
new to guix or guile):

> guix build: error: 1: not something we can build
> 
> hint: If you build from a file, make sure the last scheme expression
> returns a package, gexp, derivation value or a list of such values.

(here the file returned "1" which we can't build :))

Attachment: 0001-guix-build-Add-a-hint-for-unspecified-value.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]