From: Federico Beffa <beffa@ieee.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Dave Love <fx@gnu.org>, 25138@debbugs.gnu.org
Subject: bug#25138: failing hackage import
Date: Fri, 9 Dec 2016 23:09:36 +0100 [thread overview]
Message-ID: <CAKrPhPP0nKPwMmdtejLR1MPGKw_WF5TJUKDY9Zzezs_E_k+Jkg@mail.gmail.com> (raw)
In-Reply-To: <87inqs7rci.fsf@gnu.org>
On Fri, Dec 9, 2016 at 9:57 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> I’m 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
> <https://hackage.haskell.org/package/darcs/darcs.cabal> 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 “Build-Type: Custom”, which is
> currently not supported as noted in <https://bugs.gnu.org/23961>.
>
> 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
next prev parent reply other threads:[~2016-12-10 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 13:56 bug#25138: failing hackage import Dave Love
2016-12-09 20:57 ` Ludovic Courtès
2016-12-09 22:09 ` Federico Beffa [this message]
2016-12-12 13:40 ` Dave Love
2019-05-22 15:39 ` bug#25138: updated import error Robert Vollmert
2021-09-15 12:34 ` bug#25138: guix import hackage darcs: fails due to flag executable Lars-Dominik Braun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKrPhPP0nKPwMmdtejLR1MPGKw_WF5TJUKDY9Zzezs_E_k+Jkg@mail.gmail.com \
--to=beffa@ieee.org \
--cc=25138@debbugs.gnu.org \
--cc=fx@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).