detailed-0.9: Test module must not be named Main
Open
cabal-install: cmd/test
Cabal: stanza/test-suite/detailed-0.9
documentation
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
In the Cabal file I have:
~~~~
test-suite mytest
type: detailed-0.9
test-module: Main
other-modules: Tests
~~~~
~~~~
$ cabal-3.2 v1-test
...
[2 of 2] Compiling Main ( test/Main.hs, dist/build/mytest/Main.o )
Module imports form a cycle:
module ‘Main’ (dist/build/mytestStub/mytestStub-tmp/mytestStub.hs) imports itself
~~~~
It seems that Cabal creates its own Main module for `detailed` tests and this one conflicts with my one. I'd prefer that Cabal directly warns about a Test-Module named `Main` and that this is documented in Cabal's user guide.
Contributor guide
Assessment
This issue has not been assessed yet.