Share flags config by generating _CoqProject - #285
Conversation
| (rocq.theory | ||
| (name Stdlib) | ||
| (generate_project_file) | ||
| (flags :standard %{read-lines:rocq-flags}) |
There was a problem hiding this comment.
This enables the flag for all profiles instead of just the dev profile, but I guess that's fine right?
|
Couldn't we rather generate the dune thing out of _CoqProject? (it's just a matter of extracting the |
|
My thinking is that we will need to generate the Basically, the diff --git a/theories/_CoqProject b/theories/_CoqProject
index b34d8dd88a..cc961853c7 100644
--- a/theories/_CoqProject
+++ b/theories/_CoqProject
@@ -1,3 +1,7 @@
+--rocq-package rocq-stdlib
+-package rocq-core
+--legacy-support
+--description "Rocq standard library"
-R . Stdlib
# When editing below lines, keep the theories/dune file in sync
# to handle when requiring Rocq >= 9.2(Possibly also adding |
|
Let's just wait (about six months) until we require Rocq >= 9.3. This kind of configuration finicking is a real pain. Maybe things can be done better in the dune config but let's not pile hacks in the rocq makefile one just to save a few months. |
OK, up to you. Note however that this basically means that the development of the new packaging system will be stuck for packages depending on Another way to address this would be to add hacks to the |
|
As a reference, not that |
|
Yes, hacking the Makefile.coq target of the Makefile with something like would probably be fine but please just don't hack the _CoqProject itself. |
|
Closing in favour of #286. |
|
BTW, I do agree on the fact that the duplication of config flags between the _CoqProject and dune files is bad. I guess dune should have a way to either read _CoqProject or at least generate it. |
Dune does generate |
|
damn, one more feature that will take a while before it becomes usable :( |
What do you mean? We've been using that feature for a while now, and it seems to work pretty well. It's a good alternative to |
|
I mean until we can safely drop _CoqProject and use _RocqProjecgt (not sure what's the status of the various editors there) |
|
The generated rocqproject is for editors not for rocq makefile so IDK how useful it is for deduplication |
Pretty much all editors support |
This centralizes the configuration of flags to a file
theories/rocq-flags.conf, used by dune and by a generation script fortheories/_CoqProject. I'm thinking of later using the same script for adapting the generation oftheories/_CoqProjectto the new package management support when the Rocq version supports it.