I’m having a lot of trouble understanding precisely what the dune stanzas alias and rule do, particularly when qualified with a (package <name>) directive. In a project with several packages (several <package>.opam files), I tried:
to see whether the action would “inherit” the restriction to package lin. I didn’t expect the result:
$ dune build @dummy
$ dune build --only-packages lin @dummy
$ dune build -p lin @dummy
I can’t seem to trigger the action anymore…
In addition, I have a question. In multicoretests we have a bunch of tests defined by a bunch of
(rule
(alias runtest)
(action ...)
We would like to restrict those tests to the package multicoretests (more details in this PR). Do we have to put a (package multicoretests) in every one of our test rules, or is there a less verbose way to do it?
In general Dune tries as hard as possible to only re-run rules when the dependencies change. The @runtest alias is no exception. If you have a non-reproducible rule or for some other reason you want to re-trigger a rule each and every single time you can add (universe) to the list of dependencies.
In addition, I have a question. In multicoretests we have a bunch of tests defined by a bunch of
(rule
(alias runtest)
(action ...)
We would like to restrict those tests to the package multicoretests (more details in this PR). Do we have to put a (package multicoretests) in every one of our test rule s, or is there a less verbose way to do it?