From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: Re: [PATCH 0/6] Error reporting and hints for missing modules Date: Sat, 11 Nov 2017 00:01:28 +0100 Message-ID: References: <87zi7xwvso.fsf_-_@gnu.org> <20171108130921.25202-1-ludo@gnu.org> <72bfb7a9ff14c437a704381f807ce2f7@lepiller.eu> <86wp30psz4.fsf@gmail.com> <86r2t8y4gt.fsf@gmail.com> <87vaijgikt.fsf@gnu.org> <86shdmtcl2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----BWU6EHQVOZSAV8ZA1GFOXN24IAL6JC" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDIKN-0003cV-8c for guix-devel@gnu.org; Fri, 10 Nov 2017 18:03:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDIKK-0001CW-4K for guix-devel@gnu.org; Fri, 10 Nov 2017 18:03:11 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:36892) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eDIKJ-00018A-RI for guix-devel@gnu.org; Fri, 10 Nov 2017 18:03:08 -0500 Received: from [10.20.72.210] (taima.rezometz.org [193.48.225.254]) by lepiller.eu (OpenSMTPD) with ESMTPSA id 2c21f686 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 10 Nov 2017 23:04:38 +0000 (UTC) In-Reply-To: <86shdmtcl2.fsf@gmail.com> 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" Cc: guix-devel@gnu.org ------BWU6EHQVOZSAV8ZA1GFOXN24IAL6JC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le 10 novembre 2017 15:47:37 GMT+01:00, myglc2 a =C3= =A9crit : >On 11/10/2017 at 00:04 Ludovic Court=C3=A8s writes: >> >> Thrilled by this idea, I pushed an unbound-variable handler that can >> provide hints, such as: >> >> configuration=2Escm:88:19: zip: unbound variable >> hint: Try adding `(use-modules (gnu packages compression))'=2E >> >> Feedback welcome! > >I built and played with this=2E If I follow some of the hints literally >they lead me astray=2E Here are some suggested hint rewording=2E > >Note: You can reproduce the errors/hints below with the attached files=2E > >HTH - George > >HINT REWORDING SUGGESTIONS: > >*** test2: "NON EXISTANT PACKAGE MODULE (qemu) for qemu PACKAGE >SPECIFIED" > >The error messages =2E=2E=2E > >/root/ctest/test2:4:0: error: module (gnu packages qemu) not found >hint: Try adding `(use-package-modules virtualization)'=2E > >=2E=2E=2E are followed literally in test2=2Efix, which does not fix the >problem because the stale and non-existant 'qemu' package module >reference also needs to be removed=2E > >Maybe a better hint would be =2E=2E=2E > >hint: Remove the reference to the pachage module that was not=20 >hint: found and add `(use-package-modules virtualization)'=2E > > *** test3: 'NON EXISTANT (openssh) SERVICE MODULE specified' > >This has the same conceptual problem as test2 above=2E=20 > >The error messages =2E=2E=2E > >/root/ctest/test3:3:0: error: module (gnu services openssh) not found >hint: Try adding `(use-service-modules ssh)'=2E > >=2E=2E=2E are followed literally in test3=2Efix, which does not fix the >problem because the non-existant 'openssh' service module >reference also needs to be removed=2E > >Maybe a better hint would be =2E=2E=2E > >hint: Remove the reference to the service module that was not=20 >hint: found and add `(use-service-modules ssh)'=2E > >*** test4: "SERVICE MODULE (ssh) for openssh-service-type SERVICE >MISSING" > >A more helpful hint here =2E=2E=2E > >/root/ctest/test4:46:19: /root/ctest/test4:46:19: openssh-service-type: >unbound variable >hint: Did you forget a `use-modules' form? > >=2E=2E=2E would be =2E=2E=2E > >hint: Try adding `(use-service-modules ssh)'=2E > > *** >=20 >VERSION INFO: > >74bea6a03 gnu: linux-libre: Update to 4=2E13=2E12=2E > >make check failed as reported in bug#29245 but I don't think those >errors affect what I am seeing here=2E > >TEST FILES: I saw that last hint today buveuse I misspelled a type name (dovecot-confi= gurtation)=2E I understand the hint is great when you forget to import a se= rvice module, but it's not so great when the error is misspelling=2E Maybe = the solution would be: if the unbound variable is the name of a service, pr= opose using that module, otherwise don't show any hint=2E ------BWU6EHQVOZSAV8ZA1GFOXN24IAL6JC Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Le 10 novembre 2017 15:= 47:37 GMT+01:00, myglc2 <myglc2@gmail=2Ecom> a =C3=A9crit :
On 11/10/2017 at 00:04 Ludovic Courtès writes=
:

Thrilled by = this idea, I pushed an unbound-variable handler that can
provide hint= s, such as:

configuration=2Escm:88:19: zip: unbound variable<= br /> hint: Try adding `(use-modules (gnu packages compression))'=2E

Feedback welcome!

I built and played with t= his=2E If I follow some of the hints literally
they lead me astray=2E= Here are some suggested hint rewording=2E

Note: You can reprodu= ce the errors/hints below with the attached files=2E

HTH - Georg= e

HINT REWORDING SUGGESTIONS:

*** test2: "NON E= XISTANT PACKAGE MODULE (qemu) for qemu PACKAGE SPECIFIED"

T= he error messages =2E=2E=2E

/root/ctest/test2:4:0: error: module= (gnu packages qemu) not found
hint: Try adding `(use-package-modules = virtualization)'=2E

=2E=2E=2E are followed literally in test2=2E= fix, which does not fix the
problem because the stale and non-existant= 'qemu' package module
reference also needs to be removed=2E

Maybe a better hint would be =2E=2E=2E

hint: Remove the refere= nce to the pachage module that was not
hint: found and add `(use-pack= age-modules virtualization)'=2E

*** test3: 'NON EXISTANT (opens= sh) SERVICE MODULE specified'

This has the same conceptual probl= em as test2 above=2E

The error messages =2E=2E=2E

/r= oot/ctest/test3:3:0: error: module (gnu services openssh) not found
hi= nt: Try adding `(use-service-modules ssh)'=2E

=2E=2E=2E are foll= owed literally in test3=2Efix, which does not fix the
problem because = the non-existant 'openssh' service module
reference also needs to be r= emoved=2E

Maybe a better hint would be =2E=2E=2E

hint= : Remove the reference to the service module that was not
hint: found= and add `(use-service-modules ssh)'=2E

*** test4: "SERVIC= E MODULE (ssh) for openssh-service-type SERVICE MISSING"

A = more helpful hint here =2E=2E=2E

/root/ctest/test4:46:19: /root/= ctest/test4:46:19: openssh-service-type: unbound variable
hint: Did yo= u forget a `use-modules' form?

=2E=2E=2E would be =2E=2E=2E

hint: Try adding `(use-service-modules ssh)'=2E

***

VERSION INFO:

74bea6a03 gnu: linux-libre: Update to 4=2E= 13=2E12=2E

make check failed as reported in bug#29245 but I don'= t think those
errors affect what I am seeing here=2E

TEST F= ILES:


I saw that last= hint today buveuse I misspelled a type name (dovecot-configurtation)=2E I = understand the hint is great when you forget to import a service module, bu= t it's not so great when the error is misspelling=2E Maybe the solution= would be: if the unbound variable is the name of a service, propose using = that module, otherwise don't show any hint=2E ------BWU6EHQVOZSAV8ZA1GFOXN24IAL6JC--