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

New release needed for recent GHC / Cabal versions #123

Closed
glguy opened this issue Mar 28, 2018 · 7 comments
Closed

New release needed for recent GHC / Cabal versions #123

glguy opened this issue Mar 28, 2018 · 7 comments

Comments

@glguy
Copy link
Member

glguy commented Mar 28, 2018

Recent versions of Cabal are imposing a Cabal<1.25 constraint due to released alex's use of a Custom Setup.hs. @hvr fixed this in the repository already. To build my project using the released version of Cabal and GHC I have to add --allow-newer=alex:Cabal currently. Once a release is done we shouldn't have to do this!

@alpmestan
Copy link

We have the same problem in hadrian.

@simonmar
Copy link
Member

I tried to make a dist today but I hit a series of errors so I'm giving up for now. Maybe @hvr can help.

Firstly cabal new-test didn't work

alex: /home/smarlow/code/alex/data//AlexWrapper-basic: openFile: does not exist (No such file or directory)

Ok, so I tried cabal new-run gen-alex-sdist, which looked like it worked

Building executable 'gen-alex-sdist' for gen-alex-sdist-0..
[1 of 1] Compiling Main             ( Main.hs, /home/smarlow/code/alex/dist-newstyle/build/x86_64-linux/ghc-8.2.2/gen-alex-sdist-0/c/gen-alex-sdist/build/gen-alex-sdist/gen-alex-sdist-tmp/Main.o )
Linking /home/smarlow/code/alex/dist-newstyle/build/x86_64-linux/ghc-8.2.2/gen-alex-sdist-0/c/gen-alex-sdist/build/gen-alex-sdist/gen-alex-sdist ...

but cabal new-test still doesn't work (same error as above).

make sdist also doesn't work:

$ make sdist
happy  -agc src/Parser.y -o src/Parser.hs
alex -g src/Scan.x -o src/Scan.hs
mv src/Parser.y src/Parser.y.boot
mv src/Scan.x src/Scan.x.boot
cabal new-run gen-alex-sdist
Up to date
cabal sdist
Warning: Cannot run preprocessors. Run 'configure' command first.
Building source dist for alex-3.2.4...
data/AlexTemplate: copyFile: does not exist (No such file or directory)Makefile:8: recipe for target 'sdist' failed

I guessed I might need a new cabal, so I built that, which took ages. make sdist now works.

But cabal new-test in the sdist now fails:

/home/smarlow/code/alex/dist-newstyle/build/x86_64-linux/ghc-8.2.2/alex-3.2.4/x/alex/build/alex/alex-tmp/Scan.hs:40:60: error:
    • Couldn't match type ‘(AlexPosn, Char, String) -> Int -> P Token’
                     with ‘Int’
      Expected type: Int
        Actual type: Action
    • Probable cause: ‘alex_action_25’ is applied to too few arguments
      In the first argument of ‘AlexAcc’, namely ‘(alex_action_25)’
      In the expression: AlexAcc (alex_action_25)
      In the second argument of ‘listArray’, namely
        ‘[AlexAccNone, AlexAcc (alex_action_25), AlexAccNone, AlexAccNone,
          ....]’

(╯°□°)╯︵ ┻━┻

@hvr
Copy link
Member

hvr commented Mar 29, 2018

I'm on it! I'll figure this out asap

@hvr
Copy link
Member

hvr commented Mar 29, 2018

@simonmar I'm having trouble reproducing the make sdist failure (which should not happen); I'm basically getting the same result that the Travis job gets at

https://travis-ci.org/simonmar/alex/jobs/358287427

Which Git commit did you try this with? I see your output mentions alex-3.2.4, but I don't see that version in the Git repo

EDIT: After a bit more experimentation, I've managed to reproduce the issue

@hvr
Copy link
Member

hvr commented Mar 29, 2018

@simonmar I believe that #124 should make things smoother for you; can you try w/ that PR locally? (i.e. by using make sdist-test)

@simonmar
Copy link
Member

Thanks, that seems to have worked. I only had a local patch to bump the version to 3.2.4, so not sure what was going wrong exactly. Anyway, 3.2.4 uploaded to Hackage.

@alpmestan
Copy link

Thanks Simon!

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

4 participants