guix import hackage: fails with mixed indentation

  • Done
  • quality assurance status badge
Details
2 participants
  • Lars-Dominik Braun
  • Robert Vollmert
Owner
unassigned
Submitted by
Robert Vollmert
Severity
normal
R
R
Robert Vollmert wrote on 15 May 2019 11:12
guix import hackage wai-app-static fails (comment syntax?)
(address . bug-guix@gnu.org)
549E7618-EE8E-47FD-A026-3AB32E96B0AC@vllmrt.net
$ guix import hackage wai-app-static
Syntax error: unexpected token : (ghc-options (-Wall)) (at line 106, column 2)

The relevant extract of the cabal file is:

test-suite runtests
[…]
build-depends: base >= 4 && < 5
[…]
, mockery
-- , containers
ghc-options: -Wall

Presumably the double dash comment is tripping `guix import` up.
R
R
Robert Vollmert wrote on 15 May 2019 11:21
indentation error
(address . 35743@debbugs.gnu.org)
C15F98B1-401E-4213-82C4-E6983AFA5AB5@vllmrt.net
I learned about `guix import hackage --stdin`, and it turns out the problem is with bad indentation in the cabal file. (The offending line is indented by two spaces instead of four spaces for the block before.) It’s unclear to me whether this is a “valid” cabal file as it is.
R
R
Robert Vollmert wrote on 22 May 2019 09:27
fixed upstream
(address . 35743@debbugs.gnu.org)
DE571426-7F76-43B9-B272-B43501F4A72E@vllmrt.net
This specific case has been fixed upstream, and should eventually
make it to hackage:


The issue does remain in the sense that `guix import` doesn’t parse
some such cabal files that `cabal` is happy with — mark done anyway?
R
R
Robert Vollmert wrote on 24 May 2019 17:28
applies more widely
(address . 35743@debbugs.gnu.org)
EC2DBF3E-C144-492F-86B8-C38D4418608A@vllmrt.net
The problem seems more wide-spread, so should probably be fixed within import/cabal.scm.

E.g. warp:


contain things along the following lines:

benchmark builder-to-bytestring-io
...
build-depends: base
, bytestring >= 0.10.2
, gauge
, deepseq
, streaming-commons

if flag(use-bytestring-builder)
build-depends: bytestring < 0.10.2.0
, bytestring-builder

This kind of out-dented conditional seems not very rare.
R
R
Robert Vollmert wrote on 16 Jun 2019 14:39
retitle guix import hackage bug
(address . control@debbugs.gnu.org)
CC23F61C-84FA-463C-A575-CE7168367701@vllmrt.net
retitle 35743 guix import hackage: fails with mixed indentation
thanks
L
L
Lars-Dominik Braun wrote on 3 Dec 2023 09:16
Re: guix import hackage: fails with mixed indentation
(name . Robert Vollmert)(address . rob@vllmrt.net)(address . 35743-done@debbugs.gnu.org)
ZWw5WGCt8h2sDiMw@noor.fritz.box
Hi,

Toggle quote (5 lines)
> http://hackage.haskell.org/package/streaming-commons-0.2.1.0/streaming-commons.cabal
>
> contain things along the following lines:

these should be fixed by the patch in #67564.

Cheers,
Lars
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 35743@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35743
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch