From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#36592: no output for guix package -f when the file evaluates to nothing Date: Fri, 20 Sep 2019 09:42:22 +0200 Message-ID: <87mueztnvl.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60624) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBDZG-0001CJ-Ry for bug-guix@gnu.org; Fri, 20 Sep 2019 03:43:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBDZF-0005AY-UG for bug-guix@gnu.org; Fri, 20 Sep 2019 03:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBDZF-0005AP-SC for bug-guix@gnu.org; Fri, 20 Sep 2019 03:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBDZF-0000AB-P9 for bug-guix@gnu.org; Fri, 20 Sep 2019 03:43:01 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: (Julien Lepiller's message of "Thu, 11 Jul 2019 11:31:04 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Julien Lepiller Cc: 36592-done@debbugs.gnu.org Hello, Julien Lepiller skribis: > Users tend to copy what they see in our code base, so it's not rare to ha= ve to help them realise that if their last statement is (define-public ...)= , the file doesn't evaluate to a package. > > Running guix build -f mypackage.scm at least gives an error saying it doe= sn't know how to compile #. > > Running guix package -f mypackage.scm returns immediately with no error m= essage and a status of 0, but doesn't actually build or install anything. Y= ou can even try with an empty file :) > > There should be an error message, and probably even a hint. Fixed in f9c0400392843540a87985a67ffb9fb6e4dbc2fa. It doesn=E2=80=99t prov= ide a hint though. I thought we may want to provide =E2=80=98load*=E2=80=99 a type predicate t= hat it would check, so that it can say =E2=80=9Cgot #, expected =E2= =80=9D. However, we=E2=80=99d need a contract rather than a mere predicate to have = nice error reporting, so I decided to punt on this for now. Ludo=E2=80=99.