Closed andreasabel closed 2 years ago
They cannot be repaired, even you get happy
available (by having it in PATH, which matrix doesn't so we catch missing build-tool-depends
):
alex-3.2.1 master % cabal build -w ghc-8.0.2
Resolving dependencies...
Build profile: -w ghc-8.0.2 -O1
In order, the following will be built (use -v for more details):
- alex-3.2.1 (exe:alex) (first run)
[1 of 1] Compiling Main ( /codetmp/alex/alex-3.2.1/dist-newstyle/build/x86_64-linux/ghc-8.0.2/alex-3.2.1/setup/setup.hs, /codetmp/alex/alex-3.2.1/dist-newstyle/build/x86_64-linux/ghc-8.0.2/alex-3.2.1/setup/Main.o )
Linking /codetmp/alex/alex-3.2.1/dist-newstyle/build/x86_64-linux/ghc-8.0.2/alex-3.2.1/setup/setup ...
Configuring alex-3.2.1...
Preprocessing executable 'alex' for alex-3.2.1...
alex: /codetmp/alex/alex-3.2.1/././AlexTemplate-ghc: openFile: does not exist (No such file or directory)
The build-type: Custom
Setup.hs
is not working. Later alex
are build-type: Simple
.
FYI: build-tool-depends
can (should) have version range.
Thanks for the insight, @phadej !
Based on the verdict The program 'happy' is required but it could not be found
I did the following experiment on alex-3.2.1
:
happy
cabal get alex-3.2.1
cd alex-3.2.1
cabal --storedir=$PWD install -w ghc-8.2.2
then failed with the same error (missing happy
)build-tool: happy
to alex-3.2.1
and retried install
happy
locally on the way Following these results, I revised alex-3.2.1
, only to see matrix.hackage failing with a different error:
setup: The program 'alex' is required but it could not be found
Well, I still had alex
in my PATH
, which poisoned my experiment.
So, I am going to undo my revision.
Also, in the light of https://github.com/haskell/cabal/issues/7808 I am no longer sure what the FAIL(pkg) verdict of matrix.hackage means. Because the following experiments might have different outcome.
cabal install alex-NNN
(remote installation)cabal get alex-NNN; cd alex-NNN; cabal install
(local installation)cabal get alex-NNN; cd alex-NNN; cabal build
(local build)alex-NNN
as a build-tool dependency could have even have another semantics than the above three.Perhaps matrix.hackage should make the setup of its experiment explicit, so its verdicts can be interpreted more precisely.
alex
needing alex
is exactly why https://github.com/simonmar/alex/pull/120 was done. Repairing build-type: Custom
alexes are not worth your time.
I wrote:
So, I am going to undo my revision.
So I thought, but looks I went down a one-way street. My attempt to revert the revision is failing with:
Cannot remove existing legacy-tool dependency on 'happy' in executable 'alex' component
Well, extensionally my revision did not make much of a difference..., so this is not a catastrophy.
P.S.: How auspicious, getting issue number #321 to repair
alex-3.2.1
. :)
Yeah, not so auspicious... (More like famous last words...) :-D
alex < 3.2.2
is listed as broken on matrix.hackage.E.g. the build log for https://matrix.hackage.haskell.org/#/package/alex/3.2.1/ghc-8.2.2@1616116046 says:
Maybe the fix is to add
build-tools: happy
. However, this could have been omitted on purpose. Note that instead the tarball contains preprocessed versions of the lexer (.x
) and parser (.y
) definitions:So maybe
alex-3.2.1
was relying on the preprocessed versions to be picked up bycabal
?P.S.: How auspicious, getting issue number #321 to repair
alex-3.2.1
. :)