You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug test-suite options used in common stanzas fail with an unknown field error. In the test-suite stanza the required fields are missing, even if they are provided by import.
Errors encountered when parsing cabal file ./cabal-testing.cabal:
cabal-testing.cabal:14:1: error:
Test suite "tests" is missing required field "main-is" or the field is not present in all conditional branches.
12 | main-is: Test.hs
13 |
14 | test-suite tests
| ^
cabal-testing.cabal:11:3: warning:
Unknown field: "type"
10 | common common-test
11 | type: exitcode-stdio-1.0
| ^
cabal-testing.cabal:12:3: warning:
Unknown field: "main-is"
11 | type: exitcode-stdio-1.0
12 | main-is: Test.hs
| ^
Expected behavior
Cabal should not error when using test-suite options in common stanzas. Cabal should recognize that the required options are provided by through import.
System information
NixOS 22.05
Cabal 3.8.1.0
GHC 9.2.4
The text was updated successfully, but these errors were encountered:
oberblastmeister
changed the title
test suite options don't work in common stanzastest-suite options don't work in common stanzas
Aug 24, 2022
What should the behaviour be when the options are imported in a non-test? Is there any explanation in the manual or code comments or PR or issue why only options common to all stanzas had been made permissible under common?
Describe the bug
test-suite
options used in common stanzas fail with an unknown field error. In thetest-suite
stanza the required fields are missing, even if they are provided byimport
.To Reproduce
clone https://github.com/oberblastmeister/cabal-testing.
cabal output
Expected behavior
Cabal should not error when using
test-suite
options in common stanzas. Cabal should recognize that the required options are provided by throughimport
.System information
The text was updated successfully, but these errors were encountered: