haskell-hvr / cassava

A CSV parsing and encoding library optimized for ease of use and high performance
http://hackage.haskell.org/package/cassava
BSD 3-Clause "New" or "Revised" License
222 stars 105 forks source link

cassava doesn't compile with ghc 9.0.1rc1 even with --allow-new #191

Closed GeorgeCo closed 3 years ago

GeorgeCo commented 3 years ago
$ cabal install cassava --lib --allow-new
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.2.0.0 supports
'ghc' version < 8.12): /usr/local/bin/ghc is version 9.0.0.20201227
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.2.0.0 supports
'ghc' version < 8.12): /usr/local/bin/ghc is version 9.0.0.20201227
Resolving dependencies...
Build profile: -w ghc-9.0.0.20201227 -O1
In order, the following will be built (use -v for more details):
 - cassava-0.5.2.0 (lib) (requires build)
Starting     cassava-0.5.2.0 (lib)
Building     cassava-0.5.2.0 (lib)

Failed to build cassava-0.5.2.0.
Build log (
/Users/gcolpitts/.cabal/logs/ghc-9.0.0.20201227/cssv-0.5.2.0-e15b2a6d.log ):
Configuring library for cassava-0.5.2.0..
Preprocessing library for cassava-0.5.2.0..
Building library for cassava-0.5.2.0..

src/Data/Csv/Conversion.hs:26:3: error:
     error: **INVARIANT BROKEN** Detected invalid combination of `text-short` and `bytestring` versions. Please verify the `pre-bytestring-0.10-4` flag-logic in the .cabal file wasn't elided.
   |
26 | # error **INVARIANT BROKEN** Detected invalid combination of `text-short` and `bytestring` versions. Please verify the `pre-bytestring-0.10-4` flag-logic in the .cabal file wasn't elided.
   |   ^
# error **INVARIANT BROKEN** Detected invalid combination of `text-short` and `bytestring` versions. Please verify the `pre-bytestring-0.10-4` flag-logic in the .cabal file wasn't elided.
  ^

src/Data/Csv/Conversion.hs:100:5: error:
     warning: 'MIN_VERSION_text_short' is not defined, evaluates to 0 [-Wundef]
    |
100 | #if MIN_VERSION_text_short(0,1,0)
    |     ^
#if MIN_VERSION_text_short(0,1,0)
...
 ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.0.0.20201227
GeorgeCo commented 3 years ago

This is at least partially dependent on #177 and fixing that might fix this. Not sure

sjakobi commented 3 years ago

I'm not sure in what way this was broken in the first place, but it seems to be fixed with @phadej's latest revision: http://hackage.haskell.org/package/cassava-0.5.2.0/revisions/

phadej commented 3 years ago

--allow-newer without any restrictions (not even base or bytestring, or better to specific packages, i.e. cassava:base or cassava-0.5.2.0:base) is messing with everything. Solver could pickup arbitrary stuff.

I'm not surprised it didn't work. (It never works).