BreakOut 2020 12 03 Paolo
present: Emilio, Paolo
- a rule can be seen as an arrow:
{dep} -[action]-> {targets}
Examples:
{ foo.cpp } -[tool] -> {foo.v,foo_names.v}
{ foo.v } -[coqc]-> { foo.vo }
{ foo_proof.v } -[coqc]-> ...
{ bar_proof.v } -[coqc]-> ...
We'd like a more parallel graph, however coqdep
requires the
generation of all .v
files before it can be called.
1.- modify Coq / coqdep to have a mode similar to ocamldep -modules
A first version is implemented by using coqdep's Abshishek's patch,
see https://github.com/coq/coq/pull/12108
2.- existing workaround with dune: split projects into (coq.theory ...)
in such a way that there is parallelism as Dune handles coqdep
invocations per-theory; for {a,b}.cpp
do:
(coq.theory
(name a))
(coq.theory
(name b))
We agree that https://github.com/coq/coq/pull/12108 can be merged, improving the specification and adding a few extra checks.
When is interscope composition going to be ready? Emilio says as soon as possible, absolutely top priority.
opam pin add dune
should work for testing once the branch is ready
How to add custom rules to dune?
There are 2 approaches:
- Use the OCaml API
- Generate Dune files
Notes:
- Other users of code generation https://github.com/coq-community/coqffi
- dune plugins are >= 1 year away, that needs a stable dune API, and maybe a change on the configuration language, discussion is ongoing Dune upstream
- dune is well-funded and maintained
- Dune 3 should make dune file generation much better, as it can be done by regular rules
To the extent possible under law, the contributors of “Cocorico!, the Coq wiki” have waived all copyright and related or neighboring rights to their contributions.
By contributing to Cocorico!, the Coq wiki, you agree that you hold the copyright and you agree to license your contribution under the CC0 license or you agree that you have permission to distribute your contribution under the CC0 license.