code-generators documentation is unclear about which GHC options are passed #9238
Labels
documentation
re: code-generators
Concerning the `code-generators` field/functionality for `testsuite`s
The
code-generators
documentation is a bit unclear about which component the options passed to the generation executable are intended to compile.I performed some investigation and the GHC options which are passed to the code generator are actually the options you need to build the test executable rather than any of the library components.
Therefore I think this limits the utility of this feature as it can't work unless there is a lucky alignment that the same options work for your doctests as would work for your test executable. One case I tried which failed was adding
ghc-options: -XRoleAnnotations
to the library stanza, which caused the doctest to fail with:This is in contrast to the previous
cabal-docspec
approach which generated a file which contained the options which were used to build the package.The text was updated successfully, but these errors were encountered: