From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: bug#25138: failing hackage import Date: Fri, 9 Dec 2016 23:09:36 +0100 Message-ID: References: <87vauu7ceb.fsf@pc102091.liv.ac.uk> <87inqs7rci.fsf@gnu.org> 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]:37728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFVfx-0001Xk-Jt for bug-guix@gnu.org; Fri, 09 Dec 2016 19:38:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFVfu-0001th-Fv for bug-guix@gnu.org; Fri, 09 Dec 2016 19:38:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cFVfu-0001td-C4 for bug-guix@gnu.org; Fri, 09 Dec 2016 19:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cFVfu-0004y1-3c for bug-guix@gnu.org; Fri, 09 Dec 2016 19:38:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87inqs7rci.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Dave Love , 25138@debbugs.gnu.org On Fri, Dec 9, 2016 at 9:57 PM, Ludovic Court=C3=A8s wrote: > I=E2=80=99m seeing a different error: > > --8<---------------cut here---------------start------------->8--- > $ git describe > v0.11.0-3322-gf80b4d2 > $ ./pre-inst-env guix import hackage -t darcs > Syntax error: unexpected token : (buildable (False)) (at line 494, column= 4) > Syntax error: unexpected end of input > guix import: error: failed to download cabal file for package 'darcs' > --8<---------------cut here---------------end--------------->8--- > > The .cabal file is at > and the faulty > line comes from: > > --8<---------------cut here---------------start------------->8--- > Executable darcs > if !flag(executable) > buildable: False > else > buildable: True > --8<---------------cut here---------------end--------------->8--- > > In addition, this .cabal file has =E2=80=9CBuild-Type: Custom=E2=80=9D, w= hich is > currently not supported as noted in . > > Federico, WDYT? The problem is that the name of the flag is 'executable' and the string 'executable' is also a reserved keyword to define the start of a cabal file section. The cabal parser incorrectly dismissed this keyword as a possible flag name (in the code it is referred to as a test identifier). See line 369 of the file 'guix/import/cabal.scm'. The predicate 'is-id' should be smarter and recognize if the string 'executable' refers to the start of an 'executable section' or not (and similarly for some other reserved keywords dismissed by the same procedure). The predicate 'is-id' dismisses some specific reserved keywords such as 'executable' because this check is performed before the ones (based on full lines) such as 'is-exec' which checks for the start of an executable section. HTH, Fede