WIP: adding package management infrastructure#21564
WIP: adding package management infrastructure#21564rlepigre-skylabs-ai wants to merge 10 commits intorocq-prover:masterfrom
Conversation
|
Regarding the adaptation of We would then add Of course, we'd still need to make sure that |
6fd2b26 to
fd3edd8
Compare
|
fd3edd8 to
5f9a342
Compare
Good point, I now only add
Yeah, maybe. I was thinking of
Yeah, I think they probably should, yes. I initially thought of the cmxs output as a way to get external dependencies, for example in |
|
Regarding adding a |
if "has the has" is meant to be "contains the hash" then yes |
Oups, I edited the comment. |
5f9a342 to
0fd9ef3
Compare
|
I've now added the |
0fd9ef3 to
52646c6
Compare
|
@SkySkimmer what do you think should be the next steps here? Should I make it so that It's also not clear to me how to make tests for this PR. Any recommendation on that front? |
|
I still don't understand what the transition is supposed to look like. |
|
That seems like the easiest thing to do (potentially using symbolic links instead of actual copies, but that might lead to problems). Do you see another alternative? |
|
I don't think the argument parsing in coqproject_file and coqargs are the right places to call resolve. Is findlib even initialized when we're in that code?
test-suite/coq-makefile and test-suite/misc have tests which are arbitrary scripts
If we have copies (including symbolic links) won't they get detected as conflicts? eg Require Prelude would say "found prelude.vo in lib/coq/theories/... and lib/rocq-core/..." |
I guess that any particular project you should not rely both on packages and on Do you think something like that could work? |
|
Do we really want to force the transition order like that? |
|
I think this would be OK if package that have transitioned can be depended on by packages that have not, which would simply mean double-installing everything. To me, it seems fine to require that a package can only transition if all its dependencies have. |
|
also isn't part of the point of this system that we can multiple packages using the same logical paths? but such packages can't be double installed |
|
Yeah, that's a good point. I guess they can't right now, so at least that's not a regression. We can only get that benefit when the legacy installation method is removed I guess. |
|
If we installed only once, we could have coqdep/coqc implicitly add -Q for all findlib packages if no -package is used. This may break dune though. |
52646c6 to
9a4ae80
Compare
|
This needs more testing, but I believe that this PR has everything for the first step, including the installation of |
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