-
Notifications
You must be signed in to change notification settings - Fork 453
Generate "_CoqProject" files for Coq theories #11752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@ejgallego any chance you could take a look at this? |
|
Yes @rlepigre , I'm almost at the point I will resume work on Dune Rocq; thanks for your patience. |
|
Looks pretty good to me, I have some minor comments, but I suggest to add a changelog and documentation, as I can fix the comments myself. |
|
@ejgallego I added a changelog, but let's wait until we decide how to address the issues I raised in the description of the PR. I'd love to hear your take on these. |
I guess another alternative would be to have |
That already exists: However, I never managed to get help to integrate support in editors, and in particular in PG (see here). |
|
Having the "fake toplevel" builtin sounds like it would make it much easier to use for IDEs. |
How so? Editors would have to:
The currently possible alternative is to just run |
I think it is fine to fail in both cases, tho we may want to have a better error message, right? What's your take on those? The way I see this patch, it is mostly for backwards compatibility, at some point editors should try to understand dune files directly. I guess we should try to add Something that is not clear to me if we need to install |
|
Some IDEs share the process between multiple files, so they do need to extract arguments and don't want to just start a fresh toplevel. |
0c8d9fa to
70787ac
Compare
|
@Alizter @ejgallego I think this is now in a very reasonable state, since the feature is now opt-in. Hopefully we can get this in quickly. |
|
CI failures look spurious. |
Signed-off-by: Rodolphe Lepigre <[email protected]>
Signed-off-by: Rodolphe Lepigre <[email protected]>
Also fix a few documentation typos. Signed-off-by: Rodolphe Lepigre <[email protected]>
|
Thanks @Alizter! |
This is a proof of concept for something @ejgallego and I discussed in the past as an alternative to using
dune coq topfor editors. We generate one_CoqProjectfile for eachcoq.theorystanza, which should allow good support across editors for stepping through Coq/Rocq source files.This is incompatible with the following features, which I see as non-essential (i.e., could be removed IMO):
coq.theorystanza in a given directory.coq.theorystanza.If we want to push this through, we might want a way to disable generation of_CoqProjectby supporting something like(project_file false)in thecoq.theorystanza.This feature is enabled by adding
(generate_project_file)to thecoq.theorystanza. When used in conjunction with(modules_flags ...)and error is given. No specific error is currently given in cases where severalcoq.theorystanzas in the same directory use the new flag, however this still errors in a reasonable way (multiple rules generating_CoqProject). This could be improved, but that is not essential for a first version.