WIP: adding package management infrastructure #21564
Draft
+139
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an attempt at the first necessary steps to implement rocq-prover/rfcs#101, whose aim is to add proper package management to Rocq (piggy-backing on
findlib). This was discussed in this week's Rocq Call.Current state
In the current version, the following two changes are done:
rocq depcommand is extended with a-package <pkg>argument (similar to that ofocamlfind).rocqfindtool is added: given a list of package names, it returns the necessary-Q/-Ioptions to use them.Both seem to work as I expect them to, at least on the small-ish tests I ran.
More work is obviously needed, for instance adding a similar
-packageoption to other commands, but argument handling is not fully shared between commands (rocqchk,rocq doc, ...) if I understand correctly, so I'd prefer to agree on some kind of plan (maybe involving refactoring) before doing changes in several places.Testing done
My testing setup was constructed as follows:
And writing the following to file
fake-lib-dir/rocq-core/META.With this setup, I could then for example run:
I also tested the
rocq depby writing the following to filetest.v:And the running the following command.
TODO