From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: The usability of Guix configurations Date: Tue, 07 Nov 2017 10:59:41 -0500 Message-ID: <86efpat6z6.fsf@gmail.com> References: <868tfjw4is.fsf@gmail.com> <20171106221621.GA2534@jasmine.lan> <86o9oex34v.fsf@gmail.com> <779b1b6f2043e03a2f911981142e7740@lepiller.eu> <777f3534955ec61a520ff5f9b7054673@lepiller.eu> <86tvy6tbz5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC6Hz-0007m4-Te for guix-devel@gnu.org; Tue, 07 Nov 2017 10:59:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC6Hw-0006cr-Nv for guix-devel@gnu.org; Tue, 07 Nov 2017 10:59:47 -0500 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:44678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eC6Hw-0006cZ-Jb for guix-devel@gnu.org; Tue, 07 Nov 2017 10:59:44 -0500 Received: by mail-qt0-x234.google.com with SMTP id 8so15818284qtv.1 for ; Tue, 07 Nov 2017 07:59:44 -0800 (PST) In-Reply-To: (julien lepiller's message of "Tue, 07 Nov 2017 15:52:08 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: julien lepiller Cc: guix-devel@gnu.org On 11/07/2017 at 15:52 julien lepiller writes: > Le 2017-11-07 15:11, myglc2 a =C3=A9crit=C2=A0: >> On 11/07/2017 at 14:13 julien lepiller writes: >>> >>> This new version outputs something like this : >>> >>> >>> guix system: error: failed to load 'vm-image.tmpl': >>> vm-image.tmpl:6:0: vm-image.tmpl:6:0: Package module "abc" does not >>> exist. >>> Check the "use-package-modules" line in your configuration. >> >> Thanks Julien, I tried the patch and it works for me. I think it is a >> great improvement. >> >> Small suggestion: is it feasible for the last line to read: >> >> Please add a module containing "abc" to the "use-package-modules" line >> in your configuration. > > Wouldn't that be confusing though? > > Maybe you're confused because modules have the same name as some > packages, > but there is no relation between a package name and its module in > general. > In (use-package-modules abc), abc refers to a file named > 'gnu/packages/abc.go' > and the error happens when this file doesn't exist. > > Maybe that last line could be a hint as to how to find the correct > module, though, > such as: > > guix system: error: failed to load 'vm-image.tmpl': > vm-image.tmpl:6:0: vm-image.tmpl:6:0: Package module "abc" does not > exist. > Check the "use-package-modules" line in your configuration. > Hint: You may use `guix package -s foo` to search for foo's location. > Hint: If you get the line "location: gnu/packages/ssh.scm:174:2", > Hint: you want to add ssh in use-package-modules. > > And similarly with services: > > guix system: error: failed to load 'vm-image.tmpl': > vm-image.tmpl:7:0: vm-image.tmpl:7:0: Service module "abc" does not > exist. > Check the "use-service-modules" line in your configuration. > Hint: You may use `guix system search foo` to search for foo's location. > Hint: If you get the line "location: gnu/services/ssh.scm:188:2", > Hint: you want to add ssh in use-service-modules. > > Maybe that's too much? Not for me. Looks great! Just a couple minor suggestions: 1) How about narrowing search to locations like this: Hint: You may use `guix package --show=3Dfoo | grep location` to search for= foo's location. 2) I think you mean to say "foo" where you say "ssh" in the last two HINTs