Enhance include
to depend on generated files, rather than on ones in the source tree
#11525
Labels
docs
Documentation improvements
open-to-contribution
External contributors are welcomed to do a PR to solve the issue
Desired Behavior
According to current documentation:
It is a common use case for user to create OCaml executable that would generate a
dune.inc.gen
file and theninclude
it into the dune file.More about other use cases in official dune guide.
My current understanding is that include happens before rule generation. As a user, one may expect dune to regenerate generated file for me first before including it. Currently, I have to run
dune build
twice:dune.inc.gen
dune.inc.gen
There are multiple approaches we can take, I am not sure what is the best one, so will list couple:
deps
toinclude
stanza to have ability to depend on some generated file/aliasinclude-gen
stanza that would expect file to be generated by rules, rather than picking it up from source treeExample
Examples in official dune guide that have current behavior.
Thanks!
The text was updated successfully, but these errors were encountered: