-
Notifications
You must be signed in to change notification settings - Fork 13.3k
make: stale diagnostics info in .json files can break unclean builds #25364
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
Comments
(I am now double-checking whether a build from a fresh directory gets rid of the problem, as I assume it will. If so, then this is a relatively low priority ticket -- potentially even closable if the problem does not re-exhibit itself after that fresh build finishes...) |
(removed comment with totally bogus claims) |
Ah, I think I see the problem: our diagnostics plugin works by treating the json files as representing the error codes registered by all the crates. But if there's a json file lying around from a previous build for a crate that we have not yet rebuilt, then we can erroneously load it in and report a conflict. One will only observe this occurring if the distribution of diagnostic codes has shifted between the various crates. (Unfortunately in my experience Anyway, the simplest thing might be to add a make rule that just deletes the .json files if they predate any of the files from its origin crate. (I.e., work with the assumption that touching any of those files implies that the .json is out-of-date.) I will see what I can do about that. |
I could not figure out a good way to encode this solely in makefile rules. Even the approach here is pretty ad-hoc; it is heavily relying on the fact that all rustc crates (and thus all the json files that compiling such crates would generate on the side) have to wait for `libsyntax` to be built before they can be compiled, and thus it should be sound to make this check a prereq for the `stamp.syntax`. (At least, that is what I hope.) Fix rust-lang#25364
(deleted comment that was meant for #25380) |
See also PR #25592, which notes that in addition to the bug outlined here, there is also the issue that:
|
Triage: hopefully fixed by rustbuild? |
I think we've since fixed this, so closing. |
make: error E0038 from
librustc' also found in
tmp/extended-errors/librustc_typeck.json' (from unclean build?)That is, I did a
git pull
up to:in a build directory that already had artifacts from a prior build lying around.
I re-ran
configure
(something I do sometimes whengit pull
'ing with an unknown set of changes):And then when attempting the build, I got this:
The text was updated successfully, but these errors were encountered: