haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
298 stars 82 forks source link

alex-3.1.5 doesn't declare its dependency on happy #75

Closed peti closed 8 years ago

peti commented 8 years ago

Citing from http://hydra.cryp.to/build/1389306/nixlog/1/raw:

Building alex-3.1.5...
Preprocessing executable 'alex' for alex-3.1.5...
Setup: The program 'happy' is required but it could not be found

Apparently a build-tools: happy attribute is missing from the Cabal file.

peti commented 8 years ago

And while I am at it ... perl seems to be missing, too.

simonmar commented 8 years ago

Sigh, alex is not supposed to depend on Happy because it comes with the Happy-generated files. But this functionality in Cabal seems to break all the time. Let me check and see what happened.

simonmar commented 8 years ago

Uploaded 3.1.6 without the problem, and filed an issue with cabal: https://github.com/haskell/cabal/issues/2940

hvr commented 8 years ago

Cabal should have never attempted to regenerate the parsers if build-tools: happy is not specified

simonmar commented 8 years ago

Do you mean "should" as in "it doesn't behave like that right now, but someone should fix it", or "I believe it behaves like that now, so if it doesn't it's a bug"?

If Cabal never runs Happy unless build-tools: happy is present, then I would need to have a -f devel flag to alex to enable the build-tools: happy line when modifying the parser or building the source distribution.