help-guix
[Top][All Lists]
Advanced

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

Errors in modules are suppressed?


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

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:

+(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)


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

(define-module (foo)
 #:export (bar))

(this is not defined)
(define bar "en_US.utf8")


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]