From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix system: error: service 'ssh-daemon' requires 'networking', which is undefined Date: Tue, 19 Jul 2016 14:43:41 +0200 Message-ID: <87wpkhlrwi.fsf@gnu.org> References: <874m7qzvyx.fsf@gnu.org> <0329ad9f3fc879d5b76e3d9bf895d75d@tobias.gr> 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]:40016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPUNK-0007PY-FZ for guix-devel@gnu.org; Tue, 19 Jul 2016 08:43:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPUNF-00016m-8t for guix-devel@gnu.org; Tue, 19 Jul 2016 08:43:49 -0400 In-Reply-To: <0329ad9f3fc879d5b76e3d9bf895d75d@tobias.gr> (Tobias Geerinckx-Rice's message of "Fri, 15 Jul 2016 20:04:26 +0200") 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: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org Tobias Geerinckx-Rice skribis: > On 2016-07-15 18:50, ludo@gnu.org wrote: >> We could improve the error message by showing the location of the >> =E2=80=98ssh-daemon=E2=80=99 Shepherd service definition, though it may = be better (but >> more difficult) to show the location of the instantiation of the >> corresponding service (the =E2=80=98(lsh-service)=E2=80=99 line in your = config file.) > > That would certainly be nice. As a newcomer (points at self), simply > scanning error messages for keywords/file locations can lead nowhere > until you learn to read what Guix is *actually* trying to say. > >> Thoughts? > > The message =E2=80=98which is undefined=E2=80=99 itself is still rather c= ryptic: the > first time I got it, I assumed my git checkout was broken. How about > something closer to =E2=80=98which is not provided by any operating-system > services=E2=80=99? I improved the message along these lines in commit 2c2ec261a8d3c37e5147038f47ad24c57cde4134, let me know what you think. To be more concrete about other improvements, here=E2=80=99s what should be feasible (but needs to be discussed to see whether it=E2=80=99s actually helpful): 1. Display the location of the Shepherd service definition: gnu/services/ssh.scm:160:4: 'ssh-daemon' requires 'networking'=E2=80= =A6 Trivial to implement, but the downside is that the user doesn=E2=80=99t really care about this file. 2. Same, but also show some sort of a stack trace (but not an actual Scheme stack trace) showing where this Shepherd service comes from: gnu/services/ssh.scm:160:4: 'ssh-daemon' requires 'networking'=E2=80= =A6 gnu/services/ssh.scm:117:30: =E2=80=A6 in extension of service 'shep= herd' gnu/services/ssh.scm:228:2: =E2=80=A6 while folding service 'lsh=E2= =80=99 instantiated here The problem is that, currently, we=E2=80=99d get the location of the (service =E2=80=A6) form, which is in the =E2=80=98lsh-service=E2=80= =99 procedure, in gnu/services/ssh.scm. It may be hard to come up with intelligible messages, and there=E2=80= =99s a risk that showing too many lines of messages would be counterproductive. Thoughts? Ludo=E2=80=99.