fpco / stackage-cli

MIT License
28 stars 4 forks source link

Failed to install #28

Closed tfausak closed 9 years ago

tfausak commented 9 years ago

I tried to install version 0.0.0 on OS X 10.10.3 with GHC 7.8.3 and Cabal 1.22.2.0. It complains that endOfLine is not in scope.

$ uname -a
Darwin mbafo.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3
$ cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library 
$ date
Mon Apr 20 08:03:43 CDT 2015
$ cabal update
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.

$ cabal install stackage-cli-0.0.0
...
[2 of 2] Compiling Main             ( main/Purge.hs, dist/build/stackage-purge/stackage-purge-tmp/Main.o )

main/Purge.hs:101:23: Not in scope: ‘endOfLine’

main/Purge.hs:107:67: Not in scope: ‘endOfLine’
cabal: Error: some packages failed to install:
stackage-cli-0.0.0 failed during the building phase. The exception was:
ExitFailure 1

Here is the offending line: https://github.com/fpco/stackage-cli/blob/0.0.0/main/Purge.hs#L107. The endOfLine parser comes from Text.Parsec.Char. I don't think it's available in parsec 3.1.5, which Cabal decided to use.

snoyberg commented 9 years ago

Thanks for the report. @DanBurton Can you look into this?

DanBurton commented 9 years ago

Yep. Looks like we need a lower bound constraint on Parsec, or I can rewrite that particular parser.

snoyberg commented 9 years ago

The function's pretty short:

endOfLine :: (Stream s m Char) => ParsecT s u m Char
endOfLine           = newline <|> crlf       <?> "new-line"

How about conditionally including it?

DanBurton commented 9 years ago

This should now be resolved with 0.0.0.2 on Hackage, can you confirm?

tfausak commented 9 years ago

Unfortunately it still fails.

$ cabal install stackage-cli-0.0.0.2
...
[2 of 2] Compiling Main             ( main/Purge.hs, dist/build/stackage-purge/stackage-purge-tmp/Main.o )

main/Purge.hs:104:25: Not in scope: ‘crlf’
cabal: Error: some packages failed to install:
stackage-cli-0.0.0.2 failed during the building phase. The exception was:
ExitFailure 1
DanBurton commented 9 years ago

Whoops, sorry about that.

I tested on my machine this time:

$ git clone git@github.com:fpco/stackage-cli
$ cd stackage-cli
$ cabal sandbox init # you can skip this part
$ cabal install --constrait 'parsec<3.1.6'

@snoyberg can you double check?

snoyberg commented 9 years ago

Looks good to me, just compiled with parsec-3.1.5. Please go ahead and release.

DanBurton commented 9 years ago

Uploaded 0.0.0.3 to hackage. @tfausak it should at least make it past these parsec errors now. Can you confirm?

tfausak commented 9 years ago

:+1: That did the trick. Thank you for the fast fix!