guix import fails for cabal-helper

  • Done
  • quality assurance status badge
Details
3 participants
  • Sergiu Marton
  • Lars-Dominik Braun
  • Robert Vollmert
Owner
unassigned
Submitted by
Sergiu Marton
Severity
normal

Debbugs page

Sergiu Marton wrote 5 years ago
(address . bug-guix@gnu.org)
CAJ=hFwS+Yz1J3JYoWV5-8d5rSBasd2yCuA2OC+pTyBg8WzMQ5A@mail.gmail.com
I've been trying to improve the Haskell tooling we have here on Guix, but
I ran into this problem: if I try to do ~guix import hackage
cabal-helper~ it fails with:

Syntax error: unexpected token : common (at line 76, column 0)
Syntax error: unexpected end of input
guix import: error: failed to download cabal file for package 'cabal-helper'

If I import ghc-mod (which depends on cabal-helper) recursively, I get this:

Syntax error: unexpected token : common (at line 76, column 0)
Syntax error: unexpected end of input
Backtrace:
13 (primitive-load "/home/brown/.config/guix/current/bin/g…")
In guix/ui.scm:
1806:12 12 (run-guix-command _ . _)
In guix/scripts/import.scm:
116:11 11 (guix-import . _)
In guix/scripts/import/hackage.scm:
132:26 10 (guix-import-hackage . _)
In guix/import/utils.scm:
425:7 9 (recursive-import _ _ #:repo->guix-package _ #:guix-name …)
397:31 8 (topological-sort _ #<procedure 7f74ceff4ed0 at guix/i…> …)
In srfi/srfi-1.scm:
592:29 7 (map1 _)
592:29 6 (map1 _)
592:29 5 (map1 _)
592:29 4 (map1 _)
592:29 3 (map1 ("monad-journal" "pipes" "cabal-helper"))
592:29 2 (map1 ("pipes" "cabal-helper"))
592:17 1 (map1 ("cabal-helper"))
In guix/import/utils.scm:
421:36 0 (lookup-node "cabal-helper")

guix/import/utils.scm:421:36: In procedure lookup-node:
Throw to key `vm-error' with args `(vm-run "Wrong number of values
returned to continuation (expected ~a)" (2))'.
Robert Vollmert wrote 5 years ago
(address . 38946@debbugs.gnu.org)
B77559D0-47A1-491A-B0F8-3A90E69A31E4@vllmrt.net
It appears that the guix cabal parser (in guix/import/cabal.scm) isn’t aware
of `common` stanzas.


Note that there’s quite a few issues with the cabal parser, and the format is pretty
baroque, to the extent that I wonder whether it wouldn’t be better to delegate the
parsing to cabal itself.

E.g.:


I also remember some issue with braces instead of indentation, but can’t find a bug
report right now.
Lars-Dominik Braun wrote 10 months ago
Re: guix import fails for cabal-helper
(name . Sergiu Marton)(address . brown121407@gmail.com)(address . 38946-done@debbugs.gnu.org)
ZlGLpF2iB-vx3-pe@noor.fritz.box
Hi,

Toggle quote (4 lines)
> I've been trying to improve the Haskell tooling we have here on Guix, but
> I ran into this problem: if I try to do ~guix import hackage
> cabal-helper~ it fails with:

Guix has had support for the `common` stanza for quite a while now and
importing cabal-helper works. Closing.

Lars
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 38946
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help