Open andreasabel opened 3 years ago
In the wild: cabal install java-adt-0.2018.11.4
fails.
The tarball contains a generated Lexer.hs
and Parser.hs
adjacent to Lexer.x
and Parser.y
: https://hackage.haskell.org/package/java-adt-0.2018.11.4/src/
Originating from https://github.com/haskell/cabal/issues/7251#issuecomment-767487524 :
cabal sdist
includes useless, possibly generated modules in the package Scenario:src/
a moduleM
that is generated fromM.x
(alex lexer generator source file).alex M.x
insrc
, generatingM.hs
there.M
is formally ambiguous, butcabal build
will ignore theM.hs
and useM.x
.sdist
will includeM.hs
in the package.M.hs
that will ignore in thebuild
, but still be shipped withsdist
.Enhancement request:
sdist
those that will actually be used bybuild
.To Reproduce Steps to reproduce the behavior (uses BNFC and PR #7251): [Without PR #7251, you might have to fix up the generated .cabal file.]
Notice the content of the generated archive with the redundant
.hs
files:System information
cabal
3.5.0.0ghc
8.10.3