cabal icon indicating copy to clipboard operation
cabal copied to clipboard

`cabal check` complains about a missing `Setup.hs` script when using `build-type: Hooks`

Open jorisdral opened this issue 2 months ago • 2 comments

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

jorisdral avatar Dec 15 '25 16:12 jorisdral

BTW, it seems the CHANGELOG.md file in my reproducer could be corrupted. Sorry for that

jorisdral avatar Dec 15 '25 16:12 jorisdral

This is not good, as Hackage will eventually use what Cabal say.

ffaf1 avatar Dec 15 '25 16:12 ffaf1