Open mboes opened 5 years ago
On further thought, I think we should simply deprecate the modules
attribute. It's buggy and no replacement will work all that well. If we list source files instead, we'll have to ask users to list source files in their postprocessed name rather than their original name (e.g. Foo.hs
instead of Foo.hsc
). Besides, does anyone need to be able to restrict the scope of doctest
? If so, for what reason?
cc @thumphries @guibou @regnat
Tbh we've tried using the doctest rule but gave up because it behaves rather badly in general (In particular it's a build rule and not a test rule which is a bit silly − and I don't see how to easily change that). But for the use-case we had there was absolutely no point in restricting its scope indeed.
Is your feature request related to a problem? Please describe.
It is currently possible with
haskell_doctest
to test multiple Haskell targets at once, by providing several labels to itsdeps
attribute. The problem is thathaskell_doctest
also supports restricting the set of modules we're testing via themodules
attribute. Using that attribute makes sense when there is a single target to test, but does not when there are several.There is another problem: the
modules
attribute should really be asrcs
attribute, as noted in #845. But that would be confusing, because unlike other rules, we would have asrcs
attribute listing a subset of the sources indeps
, rather than a new set ofsrcs
provideddeps
. So we need a different name or a different API altogether.