-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc: Capture diagnostics from all queries #44046
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This doesn't currently include any tests as I wasn't quite sure how to test it, but if you know how/where to add tests I'd be more than happy to do so! Otherwise I just noticed #41184 so I'm not sure if this is quite amenable to such construction, but figure it was at least likely a step in the right direction. |
Thanks, @alexcrichton! Looks good to me at a first glance. Have you done any measurements on how this affects memory consumption? We are potentially storing a lot of these query results, also in non-incremental mode, so it might make sense to optimize for the "no-diagnostics" case. But I'd measure first. |
86ed712
to
79ebc10
Compare
Oh good point! I tried to measure a bit but the one test case I used said this decreased memory usage wrt the most recent nightly, so I figured it wasn't really much effort to go ahead and optimize the representation so I've now done so. |
@bors r+ Looks good to me now! Thanks! |
📌 Commit 79ebc10 has been approved by |
☔ The latest upstream changes (presumably #43345) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit alters the `rustc::ty::maps` implementation to ensure that all output diagnostics from the compiler are tracked for the duration of each query. These are then intended to be replayed back the first time a cached value is loaded, and otherwise the cache should operate the same as it does today. Closes rust-lang#42513
79ebc10
to
8e95b3a
Compare
@bors: r=michaelwoerister |
📌 Commit 8e95b3a has been approved by |
⌛ Testing commit 8e95b3a with merge ccb1cb25a8c8134685167205b866f830d484e633... |
💔 Test failed - status-travis |
@bors retry
|
Perhaps a real failure:
|
…rister rustc: Capture diagnostics from all queries This commit alters the `rustc::ty::maps` implementation to ensure that all output diagnostics from the compiler are tracked for the duration of each query. These are then intended to be replayed back the first time a cached value is loaded, and otherwise the cache should operate the same as it does today. Closes #42513
☀️ Test successful - status-appveyor, status-travis |
This commit alters the
rustc::ty::maps
implementation to ensure that alloutput diagnostics from the compiler are tracked for the duration of each query.
These are then intended to be replayed back the first time a cached value is
loaded, and otherwise the cache should operate the same as it does today.
Closes #42513