cabal-dev
cabal-dev copied to clipboard
cabal-dev ghci cant parse --info error
@cidevant ~/Sites/Haskell/yesod-auth-api-server [master]
$ cabal-dev ghci
cabal-dev: user error (cabal: Cant parse --info output of GHC
)
System spec:
$ cabal-dev --version
cabal-dev 0.9.2
built with Cabal 1.16.0
$ cabal list cabal-install
* cabal-install
Synopsis: The command-line interface for Cabal and Hackage.
Default available version: 1.18.0.1
Installed versions: [ Unknown ]
Homepage: http://www.haskell.org/cabal/
License: BSD3
* cabal-install-bundle
Synopsis: The (bundled) command-line interface for Cabal and Hackage.
Default available version: 0.14.0
Installed versions: [ Unknown ]
License: BSD3
* cabal-install-ghc72
Synopsis: Temporary version of cabal-install for ghc-7.2
Default available version: 0.10.4
Installed versions: [ Unknown ]
Homepage: http://www.haskell.org/cabal/
License: BSD3
* cabal-install-ghc74
Synopsis: Temporary version of cabal-install for ghc-7.4
Default available version: 0.10.4
Installed versions: [ Unknown ]
Homepage: http://www.haskell.org/cabal/
License: BSD3
+1
It's not likely that we'll be able to fix this; although we'd accept patches that do so.
Can you transition to using cabal sandboxes, or are there features of cabal-dev that prevent that?
To use cabal sandboxes:
$ cabal sandbox init
$ cabal install --dependencies-only
$ cabal build
I run this instead.
ghci -package-db=cabal-dev/packages-7.6.3.conf
I tried to post this issue to cabal issue tracker, but they refused to solve it and directed me to this project. https://github.com/haskell/cabal/issues/1742
IMHO, this problem is in system configuration. When I run ghc --info
I have this output:
ghc --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv") ,("C compiler command","/usr/bin/ghc-clang-wrapper") ,("C compiler flags"," -m64 -fno-stack-protector -m64") ,("ar command","/usr/bin/ar") ,("ar flags","clqs") ,("ar supports at file","@ArSupportsAtFile@") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("perl command","/usr/bin/perl") ,("target os","OSDarwin") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","True") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("Project version","7.6.3") ,("Booter version","7.4.2") ,("Stage","2") ,("Build platform","x86_64-apple-darwin") ,("Host platform","x86_64-apple-darwin") ,("Target platform","x86_64-apple-darwin") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Unregisterised","NO") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn") ,("Leading underscore","YES") ,("Debug on","False") ,("LibDir","/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3") ,("Global Package DB","/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/package.conf.d") ,("Gcc Linker flags","[\"-m64\"]") ,("Ld Linker flags","[\"-arch\",\"x86_64\"]") ]
The most interesting are last 2 rows. They have escaped quotes. I am not sure, but this can make a troubles. Any ideas?
@creswick: Yes, I can switch to cabal sandbox, but I like cabal-dev more...
I'm not sure if the escaped quotes would cause that failure or not -- I just don't know the details of the info parser well enough myself.
Issues like this, and the general trouble with supporting cabal-dev ghci
without internal access to the cabal structures is why we're not planning on maintaining cabal-dev in the future.
I'm happy to incorporate a pull request, if you want to take a stab at fixing the parser, but I'm afraid we won't have capacity to update cabal-dev to fix ghci.
If there are particular features of cabal-dev that you prefer over cabal sandboxes then I encourage you to let the cabal devs know what those are (I'm also curious, but I'm not the right person to provide them for cabal).