cabal
cabal copied to clipboard
`cabal check` complains about a missing `Setup.hs` script when using `build-type: Hooks`
Describe the bug
As the title describes. This is the CLI output:
❯ cabal check
The following errors will cause portability problems on other environments:
Error: [missing-setup] The package is missing a Setup.hs or Setup.lhs script.
Error: Hackage would reject this package.
To Reproduce
Follow the steps for setting up a project with the Hooks build type: https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html#hooks
I've also included a reproducer here: foo.tar.gz
Then just run cabal check in the package's directory.
Expected behavior
No error should be thrown
System information
- Ubuntu 22.04
- GHC: ghc-9.6.7
- Cabal: 3.14.2.0 or 3.16.0.0
BTW, it seems the CHANGELOG.md file in my reproducer could be corrupted. Sorry for that
This is not good, as Hackage will eventually use what Cabal say.