Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cabal file parse problem #169

Closed
SamProtas opened this issue Jul 25, 2017 · 6 comments
Closed

Cabal file parse problem #169

SamProtas opened this issue Jul 25, 2017 · 6 comments

Comments

@SamProtas
Copy link

SamProtas commented Jul 25, 2017

I have two separate libraries (neither depends on the other) that use doctest. As of some time last night/today the doctest dependencies fail to build with cabal (stack has no problem).

https://travis-ci.org/SamProtas/hs-triplesec/jobs/257163837
https://travis-ci.org/SamProtas/composable-associations/jobs/257112374

The error message in question is:

cabal: internal error when reading package index: failed to parse .cabal
fileThe package index or index cache is probably corrupt. Running cabal update
might fix it.

I realize this may be a dependency of this library and not doctest itself, but I figured it was worth documenting this issue here in case others have the same problem.

Let me know if you plan to look into this and would like more information.

I can reproduce this locally on my machine (Macbook Pro) with GHC 8.0.2 and:

cabal-install version 1.24.0.1
compiled using version 1.24.1.0 of the Cabal library

With full verbosity the following command:

Macintosh:composable-associations Sam$ cabal install -v3 --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 ~/code/composable-associations/composable-associations/ ~/code/composable-associations/composable-associations-aeson/

Gives a loooooong result that ends like this:

reorder goals: True
independent goals: False
avoid reinstalls: False
shadow packages: False
strong flags: False
max backjumps: infinite
[__0] trying: composable-associations-0.1.0.0 (user goal)
[__1] trying: base-4.9.1.0/installed-4.9... (dependency of composable-associations-0.1.0.0)
[__2] trying: rts-1.0/installedrts (dependency of base-4.9.1.0/installed-4.9...)
[__3] trying: integer-gmp-1.0.0.1/installed-1.0... (dependency of base-4.9.1.0/installed-4.9...)
[__4] trying: ghc-prim-0.5.0.0/installed-0.5... (dependency of base-4.9.1.0/installed-4.9...)
[__5] trying: composable-associations-aeson-0.1.0.0 (user goal)
[__6] trying: aeson-1.2.0.0/installed-DSB... (dependency of composable-associations-aeson-0.1.0.0)
[__7] trying: vector-0.12.0.1/installed-BtK... (dependency of aeson-1.2.0.0/installed-DSB...)
[__8] trying: primitive-0.6.2.0/installed-457... (dependency of vector-0.12.0.1/installed-BtK...)
[__9] trying: transformers-0.5.2.0/installed-0.5... (dependency of primitive-0.6.2.0/installed-457...)
[_10] trying: uuid-types-1.0.3/installed-I7W... (dependency of aeson-1.2.0.0/installed-DSB...)
[_11] trying: random-1.1/installed-9tc... (dependency of uuid-types-1.0.3/installed-I7W...)
[_12] trying: binary-0.8.3.0/installed-0.8... (dependency of uuid-types-1.0.3/installed-I7W...)
[_13] trying: array-0.5.1.1/installed-0.5... (dependency of binary-0.8.3.0/installed-0.8...)
[_14] trying: time-locale-compat-0.1.1.3/installed-KZ1... (dependency of aeson-1.2.0.0/installed-DSB...)
[_15] trying: time-1.6.0.1/installed-1.6... (dependency of aeson-1.2.0.0/installed-DSB...)
[_16] trying: template-haskell-2.11.1.0/installed-2.1... (dependency of aeson-1.2.0.0/installed-DSB...)
[_17] trying: pretty-1.1.3.3/installed-1.1... (dependency of template-haskell-2.11.1.0/installed-2.1...)
[_18] trying: ghc-boot-th-8.0.2/installed-8.0... (dependency of template-haskell-2.11.1.0/installed-2.1...)
[_19] trying: tagged-0.8.5/installed-jDB... (dependency of aeson-1.2.0.0/installed-DSB...)
[_20] trying: transformers-compat-0.5.1.4/installed-84s... (dependency of tagged-0.8.5/installed-jDB...)
[_21] trying: scientific-0.3.4.12/installed-NWO... (dependency of aeson-1.2.0.0/installed-DSB...)
[_22] trying: integer-logarithms-1.0.1/installed-41V... (dependency of scientific-0.3.4.12/installed-NWO...)
[_23] trying: hashable-1.2.6.0/installed-GfC... (dependency of aeson-1.2.0.0/installed-DSB...)
[_24] trying: dlist-0.8.0.2/installed-6Wn... (dependency of aeson-1.2.0.0/installed-DSB...)
[_25] trying: deepseq-1.4.2.0/installed-1.4... (dependency of aeson-1.2.0.0/installed-DSB...)
[_26] trying: containers-0.5.7.1/installed-0.5... (dependency of aeson-1.2.0.0/installed-DSB...)
[_27] trying: bytestring-0.10.8.1/installed-0.1... (dependency of aeson-1.2.0.0/installed-DSB...)
[_28] trying: base-compat-0.9.3/installed-KeJ... (dependency of aeson-1.2.0.0/installed-DSB...)
[_29] trying: unix-2.7.2.1/installed-2.7... (dependency of base-compat-0.9.3/installed-KeJ...)
[_30] trying: attoparsec-0.13.1.0/installed-6fe... (dependency of aeson-1.2.0.0/installed-DSB...)
[_31] trying: unordered-containers-0.2.8.0/installed-Fvy... (dependency of composable-associations-aeson-0.1.0.0)
[_32] trying: text-1.2.2.1/installed-FeA... (dependency of composable-associations-aeson-0.1.0.0)
[_33] rejecting: composable-associations-aeson-0.1.0.0:!test (constraint from config file, command line flag, or user target requires opposite flag selection)
[_33] trying: composable-associations-aeson-0.1.0.0:*test
[_34] trying: doctest-0.11.2/installed-J36... (dependency of composable-associations-aeson-0.1.0.0:*test)
[_35] trying: syb-0.7/installed-4OK... (dependency of doctest-0.11.2/installed-J36...)
[_36] trying: process-1.4.3.0/installed-1.4... (dependency of doctest-0.11.2/installed-J36...)
cabal: internal error when reading package index: failed to parse .cabal
fileThe package index or index cache is probably corrupt. Running cabal update
might fix it.```
@sol
Copy link
Owner

sol commented Jul 25, 2017

@phadej can you help with this?

@phadej
Copy link
Contributor

phadej commented Jul 25, 2017

@sol I'll check

@phadej
Copy link
Contributor

phadej commented Jul 25, 2017

@SamProtas @sol, I supect that's a Cabal bug: haskell/cabal#4624

There will be fixes, but I don't know about timeline. That's very unfortunate.

I'm working on providing cabal-install-head binaries for OSX. That will be done by tomorrow (26.07, AOE)

@SamProtas
Copy link
Author

@phadej @sol Thanks for the quick replies. It looks like you're correct about the source of this issue.

I've updated my travis build matrix to use Cabal 2.0 and it's looking like that's fixed my problem (doctests turned back on, builds and doctests pass).

As far as I'm concerned this issue is closed, although considering it's likely others might end up here with this problem I'll leave it to you to decide whether to actually close the issue in this repo.

Thanks for the help!

@phadej
Copy link
Contributor

phadej commented Jul 26, 2017

@SamProtas if you need recent builds of cabal-install on OSX, there are such now: https://haskell.futurice.com/. (Official cabal-install-2.0 will be out soon though too).

@sol
Copy link
Owner

sol commented Aug 3, 2017

Can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants