guix-devel
[Top][All Lists]
Advanced

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

Re: guix system container and friends fail to report intermediate errors


From: Ludovic Courtès
Subject: Re: guix system container and friends fail to report intermediate errors
Date: Mon, 17 Apr 2023 18:07:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi!

Vladilen Kozin <vladilen.kozin@gmail.com> skribis:

> Hello. Is it possible to get better error reporting in the following
> example?
>
> $ sudo guix system -K -L /home/vlad/Code/fullmeta-guix/channel container
> os.scm
>
> And our os.scm imports some services defined in our channel above. Should
> there be an error in one of them, however, the stack trace only talks about
> inability to find that service symbol but otherwise fails to report any
> errors that may've happened when loading modules from our -L location above.
>
> Case in point. In one of the modules, I habitually used Clojury syntax and
> wrote:
>
> (define foo [1 2])
>
> (define foo-service
>   (list
>      (shepherd-service ... #$foo ...)))
>
> (define foo-service-type ...)
>
> Running the above OS derivation reports:
> ```
> Backtrace:
> In guix/store.scm:
> ... bt here ...
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> error: foo-service-type: unbound variable
> ```

If I understand correctly what’s happening, the module file that defines
‘foo’ and ‘foo-service’ fails to load with a “Wrong type to apply”
error.  Consequently, you end up with that “unbound variable” error in
your OS file.  Do I get it right?

Thanks,
Ludo’.



reply via email to

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