From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Daniel_Sch=c3=a4fer?= Subject: Re: Errors in modules are suppressed? Date: Mon, 21 Oct 2019 19:32:44 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46400) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMbY8-0002Ae-CL for help-guix@gnu.org; Mon, 21 Oct 2019 13:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMbY7-0007Ec-9B for help-guix@gnu.org; Mon, 21 Oct 2019 13:32:56 -0400 Received: from ciffreo.uberspace.de ([185.26.156.173]:38530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMbY7-0007CH-02 for help-guix@gnu.org; Mon, 21 Oct 2019 13:32:55 -0400 In-Reply-To: Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org 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 >