* Errors in modules are suppressed?
@ 2019-10-13 22:50 Daniel Schäfer
2019-10-21 17:32 ` Daniel Schäfer
2019-10-23 11:56 ` Daniel Schäfer
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Schäfer @ 2019-10-13 22:50 UTC (permalink / raw)
To: help-guix
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Errors in modules are suppressed?
2019-10-13 22:50 Errors in modules are suppressed? Daniel Schäfer
@ 2019-10-21 17:32 ` Daniel Schäfer
2019-10-23 11:56 ` Daniel Schäfer
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Schäfer @ 2019-10-21 17:32 UTC (permalink / raw)
To: help-guix
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Errors in modules are suppressed?
2019-10-13 22:50 Errors in modules are suppressed? Daniel Schäfer
2019-10-21 17:32 ` Daniel Schäfer
@ 2019-10-23 11:56 ` Daniel Schäfer
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Schäfer @ 2019-10-23 11:56 UTC (permalink / raw)
To: help-guix
The manual says in 14.4 Packaging Guidelines:
> If the package is unknown to the guix command, it may be that the
source file
> contains a syntax error, or lacks a define-public clause to export
the package
> variable. To figure it out, you may load the module from Guile to get
more
> information about the actual error:
>
> ./pre-inst-env guile -c '(use-modules (gnu packages gnew))'
Is something like that possible for reconfiguring the system?
Thanks,
Daniel
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:
>
> +(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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-23 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-13 22:50 Errors in modules are suppressed? Daniel Schäfer
2019-10-21 17:32 ` Daniel Schäfer
2019-10-23 11:56 ` Daniel Schäfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).