help-guix
[Top][All Lists]
Advanced

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

Re: Errors in modules are suppressed?


From: Daniel Schäfer
Subject: Re: Errors in modules are suppressed?
Date: Mon, 21 Oct 2019 19:32:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

Do you guys run into the same problem?
I mean, I can debug this by manually importing the module in the `guix repl`, but it would be nice to see it in the `guix system` invocation. Do you use modules? Should I use something else? Should I include the module in a different way?

On 10/14/19 12:50 AM, Daniel Schäfer wrote:
Hi all,

I'm using modules to split up my system configuration in multiple files (not sure whether that's the right approach). However, when a used module contains an error, `guix system` does not provide a helpful error message, it just says:

  $ sudo guix system build config.scm
  ice-9/eval.scm:223:20: In procedure proc:
  error: bar: unbound variable
  hint: Did you forget `(use-modules (foo))'?

when I try to use `bar` in my original file.

For a minimal working example, change your system's configuration file like this:

--8<---------------cut here---------------start------------->8---
+(add-to-load-path ".")
-(use-modules (gnu))
+(use-modules (gnu)
+             (foo))
 (use-service-modules desktop networking ssh xorg)

 (operating-system
-  (locale "en_US.utf8")
+  (locale bar)
--8<---------------cut here---------------end------------->8---


And add the new module foo.scm, which contains an error by design:

--8<---------------cut here---------------start------------->8---
(define-module (foo)
 #:export (bar))

(this is not defined)
(define bar "en_US.utf8")
--8<---------------cut here---------------end------------->8---


I'd be glad to hear about any tips to get the proper error message.

Thanks,
Daniel




reply via email to

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