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
"make" overwrites previous "make vos" progress #13921
Comments
The old .vos must be destroyed as otherwise we would load outdated files, I don't see a way around it. |
The .v files did not change, so the old .vos is still up-to-date with the code. Why would not destroying it lead to using outdated files? |
|
I suppose we could fix the issue by tampering with the modification date of the empty |
Are you saying when I build a .vo file and import another module, and both a .vo and .vos file exist for that other module, and the .vos file is older, Coq will still load the .vos file? I would have expected .vo builds to never import .vos files. |
No, that is not what I am saying. When you are building a |
But then I don't understand why "there is no point on building .vo files in the first place". The point is to check universes. But .vos builds can keep using .vos files and all is fine -- or rather, all would be fine if .vo builds wouldn't delete the perfectly fine .vos files. |
Think about the interactive use of Coq. If you are doing |
@RalfJung coqc will produce a 0-sized vos everytime a vo file is produced, because the build system cannot provide the information to coqc about what targets are stale and which ones are up to date. |
What currently happens in interactive use is that I have to wait until the .vo build completes (>30min), or re-do the .vos build (still ~5min). And that just because I accidentally did If I did |
The job of coqc is to produce one file and one file only, why would it even care with other files are stale or not? Or does this go back to the old problem that on |
It needs indeed to know which file to choose when both are present, so the current rules is pick the vos unless it is zero-sized.
Using a date is unreliable , even if a vos file is older it could still be valid. |
How is using a date ever worse that always preferring the vos file? If both vos and vo exist, and the vo is newer, then most likely the vo is "at least as valid" as the vos. So we can handle the case @silene mentioned without ever deleting any files. |
This case never happens as coqc won't always prefer the |
Yes but I am saying that the way you are ensuring this is bad.^^ Namely, you are deleting valid and up-to-date files. That's a bad idea, it destroys work that might have to be redone later. My proposed scheme is intended to work without destroying valid data and forcing work to be re-done. |
The date idea was discussed in the original PR, but likely had some problems, maybe because it is hard to add the conditional to the build rules? I don't recall to be honest. I think vio uses something like that and was also creating some trouble. |
How do the build rules come in here? I imagined they'd be unchanged. |
It just happened again that I accidentally killed 20min worth of building vos files by accidentally building a single vo file. :/ |
If Honestly I’d rather (have an option for) That’d reject this idea:
|
I just discovered another bad interaction...
So, not only dos Now I have to wait another 30min until this re-build is done... |
Description of the problem
When mixing "make vos" and "make" on the same checkout (which can easily happen accidentally), there are some bad interactions. Concretely, after a
make vos
finishes, when I typemake
and immediately Ctrl-C it, a subsequentmake vos
rebuilds everything. Somehow, building a vo file seems to destroy the corresponding vos file in a way that the next vos build needs to be re-done from scratch.Coq Version
8.13.0
The text was updated successfully, but these errors were encountered: