-
Notifications
You must be signed in to change notification settings - Fork 464
Description
Currently, it's not possible to attach (mdx) stanzas to a particular package. This makes it difficult to use these stanzas with an Opam workflow in which packages are installed and tested individually with dune runtest -p <package>. This was discussed in #3650, which added a better error message when the user attempts this.
To solve this issue, we could add a (package ...) field to the MDX stanza, with the same meaning as on rule and test stanzas. Note that this would not solve the more general case of stanzas that cannot be attached to any one package (as discussed in #3267), but this applies to rule and test stanzas as well and so seems like a distinct problem.
As it stands, there is already a (packages ...) field on MDX stanzas that is sugar for (deps (package ..) (package ..)), so directly adding a package field with different semantics would probably be too confusing. As part of this change, we could drop the packages field in favour of a more general deps specification:
(mdx
(package <package>)
(deps <dep-specification>))
CC @NathanReb