Extend unit test for GHC options as part of release process?
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
At 976f86ab67952d377c25f19e6a2594e0000900a2, I'm getting `-Wunused-top-binds` when building `cabal.project`:
```
$ cabal build all --enable-tests --enable-benchmarks
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
- Cabal-syntax-3.11.0.0 (lib) (configuration changed)
- solver-benchmarks-3 (lib) (configuration changed)
- hackage-security-0.6.2.3 (lib) (dependency rebuilt)
- cabal-benchmarks-3 (test:cabal-benchmarks) (configuration changed)
- Cabal-tests-3 (test:rpmvercmp) (configuration changed)
- Cabal-tests-3 (test:no-thunks-test) (configuration changed)
- Cabal-3.11.0.0 (lib) (configuration changed)
- solver-benchmarks-3 (test:unit-tests) (configuration changed)
- solver-benchmarks-3 (exe:hackage-benchmark) (configuration changed)
- cabal-testsuite-3 (lib:cabal-testsuite, exe:cabal-tests, exe:setup) (configuration changed)
- cabal-install-solver-3.11.0.0 (lib) (configuration changed)
- Cabal-tree-diff-3.11.0.0 (lib) (configuration changed)
- Cabal-tests-3 (test:custom-setup-tests) (configuration changed)
- Cabal-tests-3 (test:check-tests) (configuration changed)
- Cabal-described-3.11.0.0 (lib) (configuration changed)
- Cabal-QuickCheck-3.11.0.0 (lib) (configuration changed)
- cabal-install-solver-3.11.0.0 (test:unit-tests) (configuration changed)
- cabal-install-3.11.0.0 (lib) (configuration changed)
- Cabal-tests-3 (test:parser-tests) (configuration changed)
- Cabal-tests-3 (test:hackage-tests) (configuration changed)
- Cabal-tests-3 (test:unit-tests) (configuration changed)
- cabal-install-3.11.0.0 (test:unit-tests) (configuration changed)
- cabal-install-3.11.0.0 (test:mem-use-tests) (configuration changed)
- cabal-install-3.11.0.0 (test:long-tests) (configuration changed)
- cabal-install-3.11.0.0 (test:integration-tests2) (configuration changed)
- cabal-install-3.11.0.0 (exe:cabal) (configuration changed)
Configuring library for Cabal-syntax-3.11.0.0..
...
Configuring test suite 'hackage-tests' for Cabal-tests-3..
tests/UnitTests/Distribution/Simple/Program/GHC.hs:200:1: warning: [-Wunused-top-binds]
Defined but not used: ‘options_9_2_all’
|
200 | options_9_2_all =
| ^^^^^^^^^^^^^^^
tests/UnitTests/Distribution/Simple/Program/GHC.hs:212:1: warning: [-Wunused-top-binds]
Defined but not used: ‘options_9_2_affects’
|
212 | options_9_2_affects =
| ^^^^^^^^^^^^^^^^^^^
```
There's a note about how to collect newer GHC options but could we automate this with a script and also add the task of updating this unit test as part of the cabal release process?
https://github.com/haskell/cabal/blob/2dad49aae0d691896df3ad3c79c57ae55637a54e/Cabal-tests/tests/UnitTests/Distribution/Simple/Program/GHC.hs#L80-L89
Contributor guide
Assessment
This issue has not been assessed yet.