-
Notifications
You must be signed in to change notification settings - Fork 13.3k
incr.comp.: Implement compiler diagnostic persistence. #45472
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
incr.comp.: Implement compiler diagnostic persistence. #45472
Conversation
f63f753
to
2630b93
Compare
416bff1
to
8769184
Compare
/// This provides access to the incr. comp. on-disk cache for query results. | ||
/// Do not access this directly. It is only meant to be used by | ||
/// `DepGraph::try_mark_green()` and the query infrastructure in `ty::maps`. | ||
pub(crate) on_disk_query_result_cache: maps::OnDiskCache<'tcx>, |
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.
as an aside, it feels to me like "pub(crate)
visibility with scary comment" is a sign that this code is not "well aligned" in terms of module structure. We should review at some point.
|
||
// revisions: cfail1 cfail2 cfail3 | ||
// compile-flags: -Coverflow-checks=on | ||
// must-compile-successfully |
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.
this test seems good, but I wish we had some way to guarantee that the warning was coming from the red-green code. e.g., some way to assert that the relevant query that emits the warning normally was not running. But... good enough I guess.
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.
It will only start to be really exercised once we cache pre-trans data.
@bors r+ |
@bors r=nikomatsakis |
@bors r=nikomatsakis Err this PR is not in bors's queue 😕 |
@bors r=nikomatsakis |
📌 Commit 6faba5b has been approved by |
⌛ Testing commit 6faba5b with merge 3a74b1bd23da0d0fffa8f7e2a9b11b636d01450d... |
💔 Test failed - status-travis |
MIPS TLS problem same as that of #45187 (comment) and #45529 (comment). Legit. |
The linkage error here I hope will be unblocked with #45655 |
@bors: retry |
…omatsakis incr.comp.: Implement compiler diagnostic persistence. This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache. ~~It is still work in progress:~~ - ~~There's still some documentation to be added.~~ - ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~ Diagnostic message duplication is addressed separately in #45519. r? @nikomatsakis
@bors p=1 |
☀️ Test successful - status-appveyor, status-travis |
This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache.
It is still work in progress:There's still some documentation to be added.The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.Diagnostic message duplication is addressed separately in #45519.
r? @nikomatsakis