-
Notifications
You must be signed in to change notification settings - Fork 35
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
Adapt to https://github.com/coq/coq/pull/19530 #822
Conversation
8c53986
to
0fa7e87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A way should be found for test that depend on Stdlib to work.
0fa7e87
to
2849ebc
Compare
Note that to really test this in this CI you want to bump the Note the development build setup we use here (and in jsCoq and some other projects) relies heavily on dune caching, in particular it has the following features:
This saves literally hundreths of stdlib recompilation per month, and sometimes per week. |
I let you do that as I tend to wreak havoc as soon as I touch a git submodule. |
Anyway, this means this PR should now be backward compatible and should be merged before the upstream PR. That being said, I thing that pulling a whole stdlib dependency just for a few tests is probably not worth the effort but well, your piece of software, your decision. |
Ok, I've bumped to submodule to latest upstream.
I am not sure I understand the patch, but indeed it seems strange for the current Does the patch mean that after coq/coq#19530 Because that is what
Well, we need to test all Coq plugins, and moreover, we need to do tests on complex files, for example Indeed, I don't see how easily replace these tests and don't stop testing important stuff. (Happy to hear about that, for example, solving the bug about registration of generic args would allow us to remove most of In fact, the testing we do with the current CI is way minimal compared to they way we are testing flèche in real world. To give an example, we recently had an agent running for a week doing thousands and thousands of edits (RL application). Another important test is to load all of HoTT, math-comp, and Compcert, and interrupt, etc... Anyways, the current |
Pushed a few commits fixing the build setup, but indeed all tests fails as Coq cannot find the stdlib anymore. The new repository for the stdlib doesn't have build caching support, so that's an important regression; other than that, when this problem is fixed, there is no other blockage on view. |
Adapted to |
PR welcome on https://github.com/coq-community/stdlib-test/ if you want to add that but I won't do it myself, not skilled enough in dune. |
I can take care of that, however I failed to understand the new setup sorry. Questions:
|
See the CoqProject / coq_makefile input https://github.com/coq-community/stdlib-test/blob/master/theories/Make.all for details |
Sorry @proux01 , I cannot dechiper what it means, in particular I cannot see where the install location is specified. Does it mean that the |
Sure, where else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, but pending on recovering caching on https://github.com/coq-community/stdlib-test
Oh, if that's the case Dune support should be trivial. So once the split happens, people cannot do |
Just for info, another thing that is hard to test without loading lots of libs is printing. |
Ultimately indeed, but as a temporary backward compatibility measure, any failing attempt at |
I see thanks; I went and checked the code myself. The way is implemented seems problematic tho: it seems to me that |
Well, I certainly wouldn't consider that acceptable as a definitive solution but it seems to work well enough as a temporary solution. The very fact that we were able to load that code without
I'll have a look |
I need to think more about this, I was afraid that the "substitution" property would break, but maybe it can work like this. Will take care of it and report back on the main PR. For |
Coqdep fixed coq/coq@9cd7532 (still have to look at coqchk). Thanks for pointing the issue, I guess I didn't noticed it because I didn't really used it with |
Yeah, the coqdep stuff is actually quite problematic because the warnings are a real problem, but they are ignored. The, due to the way things work, if we hadn't noticed about coqdep, we would have merged, but then, a race condition is in the code, and users would have gotten build failures when using more processors than our CI. I think the root of the issue here is that our CI doesn't require silent builds. This is a key practice used in industry, but unfortunately I didn't get very far moving the Coq setup towards it. |
Yes, I'm also a bit surprised that this is only a warning.
I hope that coq/coq#19562 will help moving in that direction: if we can expect from CI project maintainers to quickly adapt to new warnings (even by just selectively silencing them as a short term solution) it will be easier to request silent builds. UNfortunately, this kind of changes takes time, for instance we only added such a check very recently in mathcomp's CI: math-comp/math-comp#1254 |
Indeed, see the corresponding Coq issue about it, but this is something we inherit from OCaml decades ago. The discussion on the OCaml issue is interesting. IMHO it is time we fix this in Coq and make coqdep failing to find a dependency and error.
I hope it helps, however past experience with projects maintainers doesn't give me a lot of hope. In general, people hate having to do stuff by hand. So either it happens because you have very advanced tooling, or the incentives need to be there. Note that moreover |
That's what coq/coq#19562 is all about. We have been historically way to kind with CI project maintainers. Having clearer rules can only help. |
All those are about coqc, should we open an issue to have a coq_makefile silent mode (ie not printing COQC INSTALL etc)? Although note that in CI we also print per-file timing info, so having silent build in CI would mean losing the timing info, not sure if that's a good tradeoff. |
That's an interesting point of view, I guess in this case we have different versions of "historically". IMHO it is more accurate to say that historically Coq didn't care too much about compatibility, with quite epic breakages happening in Coq history that brought large levels of pain to users. CI is a very recent thing Pierre-Yves Strub started and me, then Gaëtan, developed to its current state (of course a lot more people did work in CI, but current design choices were mainly this way IIRC) My view is that it is a really good thing that we have been kind to Coq users, and overall, I think our current approach has prevented a lot of pain, porting time, and frustration that grew common in Coq users before the current CI setup. |
Cool! Sure, I'll take care. When do you need it? I'm super busy this start of week. |
Coq call on the subject is planned on October 8th so no need for it before that. |
66cea73
to
93b5ce3
Compare
Thanks, according to the CI of coq/coq#19530 this works https://gitlab.inria.fr/coq/coq/-/jobs/4840390 |
Thanks @proux01 , indeed, as things stand upstream, there is no overlay needed for coq-lsp and you folks managed to make the case where Coq is installed fully backwards compatible. However, our setup for development still breaks as we cannot vendor coq-stdlib anymore due to the This would make development here pretty hard, and also for jsCoq, a typical example of our development workflow for example for the patch at coq/coq#19177 involves patching Coq and being able to build some file in CompCert pretty quick for testing; dune composed build provides large speedups here. I agree this is a specific problem we folks that often patch Coq (like coq-lsp / jsCoq and bedrock) have. |
I'm not sure I understand why we don't need an overlay here while coq-elpi needs one but well. |
@proux01 no idea, can I help with coq-elpi overlay? Happy to look at the CI failure (maybe ping me on Zulip) |
@proux01 I was trying to push to this branch but turns out that it was deleted, somehow magit didn't properly return an error message. Do you want to restore the branch so I push the updated overlay? |
ba601e9
to
48caf58
Compare
I updated the upstream branch but I don't know how to update the submodule here, so I guess that explain all the red in the CI. |
@proux01 , the submodule can be updated in the usual way, just point the Usually it is not a big deal to have overlays without updating the submodule here, as Coq's CI doesn't use the submodule, but Coq master. Submodule is here mainly to ensure The idea is to have a mechanism in CI so overlays can tell downstream CI's what Coq commit to use, but I didn't have time to implement it yet. |
Note that: - Coq is masking the `stdlib` directory in `dune`, using `(ignored_dirs ...)`
5a3b6a0
to
6648fdc
Compare
I did update the ref, but it seems you reverted the change? (edit: I mean you reverted the change in 19530) |
I don't know, I usually tend to wreck havoc with git submodules, so quite possible. |
I mean the current version of 19530 doesn't seem to match the changes you pushed here? |
To be merged in sync with the upstream PR