Trying out dune, caching is really cool, but of course IDEs (at least VsCoq) can't step through .v files — generated .vo files are in _build, so I either need make vos
or I step through the copies of .v
files in _build
(which can't be edited).
But I can't find this mentioned in
https://coq.discourse.group/t/a-guide-to-building-your-coq-libraries-and-plugins-with-dune/20?u=blaisorblade or any of the links, so did _I_ do something wrong?
Also, is there a known easy workaround? Replacing -Q theories D
with -Q _build/default/theories D
in _CoqProject doesn't do it.
cc @Emilio Jesús Gallego Arias
@Paolo G. Giarrusso , using the _CoqProject
trick is what we have been doing in Proof General, it is very hacky but it does work fine until we reach a better solution. As of today I'm afraid that IDEs need to understand that the build directory is not the source directory, usually it should be easy to patch VsCoq so _build
is used if it exists
For Ocaml, the modes do understand _build
oh, you mean the trick that I tried? Time to try proof general again...
Yes Proof General will correctly pass -Q _build/default/theories
to Coq
VsCoq should do that too, I wonder otherwise how it can work in the non-Dune case
let me try harder
I’ll report back once I’ve investigated properly, but got other things to do first. Thanks!
Well seems to work now — guess I made a mistake, but if something happens I'll complain again... however!
can dune call coqdoc?
with support for that I could probably drop makefiles entirely
otherwise, I guess I could auto-generate a different _CoqProject with sed for invoking coq_makefile, it doesn't even seem hard :-)
We will add coqdoc rules pretty soon I hope, also a method for PG / VsCoq to call Coq properly
in fact I delayed the call for beta testers as I'd like to finish these features
which are pretty easy to add
But for coqdoc you need .glob files, and dune doesn't seem to produce them? In fact I can't even call coqdoc by hand using the dune output...
(guess that's easy to fix for you...)
yes, that should be easy to fix; it is waiting actually on better integration w.r.t. flags; for example if you pass -noglob
to Coq dune will be confused as to why the .glob
file was not produced
I will tweak that shorly, as of today I'm short of cycles, but likely June will be fine
Paolo G. Giarrusso said:
Well seems to work now — guess I made a mistake, but if something happens I'll complain again... however!
If this is the best way of using VSCoq with a dune built Coq project, it may be worth opening an issue (or a PR on the README) so that others can find it
I've judged this to be best left to an issue, and filed https://github.com/coq-community/vscoq/issues/134 — I'd rather not waste Maxime's limited time on reviewing actual docs for this hack, and wait for better support.
(sorry, that might have come off slightly wrong; I was just very uncertain and defending my choice, not criticizing anybody).
Last updated: Oct 08 2024 at 16:02 UTC