unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38946: guix import fails for cabal-helper
@ 2020-01-05 15:23 Sergiu Marton
  2020-01-10 17:40 ` Robert Vollmert
  0 siblings, 1 reply; 2+ messages in thread
From: Sergiu Marton @ 2020-01-05 15:23 UTC (permalink / raw)
  To: 38946

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))'.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#38946: guix import fails for cabal-helper
  2020-01-05 15:23 bug#38946: guix import fails for cabal-helper Sergiu Marton
@ 2020-01-10 17:40 ` Robert Vollmert
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Vollmert @ 2020-01-10 17:40 UTC (permalink / raw)
  To: 38946

It appears that the guix cabal parser (in guix/import/cabal.scm) isn’t aware
of `common` stanzas.

https://www.haskell.org/cabal/users-guide/developing-packages.html#pkg-section-common-common

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.:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35743
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36690

I also remember some issue with braces instead of indentation, but can’t find a bug
report right now.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-10 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05 15:23 bug#38946: guix import fails for cabal-helper Sergiu Marton
2020-01-10 17:40 ` Robert Vollmert

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).