-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 Handler more thread-safe #49349
Conversation
993a195
to
fba94e9
Compare
Ping from review, @michaelwoerister ! |
The |
☔ The latest upstream changes (presumably #49045) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage @michaelwoerister! This PR still needs your review. |
IIRC, I tried that first, but hit a wall with some of the module dependencies. I agree that it'd be a better API, but it'll probably require a larger refactoring (and I was trying to get the proof of concept for |
Actually the scheme used by Neither is compatible with incremental compilation though. @michaelwoerister Do we have a tracking issue for incremental compilation? |
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #49558) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage @michaelwoerister! What's the status of this PR? |
☔ The latest upstream changes (presumably #49882) made this pull request unmergeable. Please resolve the merge conflicts. |
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors r+ |
📌 Commit e5fc06d has been approved by |
Make Handler more thread-safe The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of: ``` if self.tcx.sess.teach(&err.get_code().unwrap()) { err.note("..."); } ``` we'd use `err.teach("...")` cc @estebank r? @michaelwoerister
☀️ Test successful - status-appveyor, status-travis |
The use of
code_emitted
to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outsidediagnostics.rs
anyway. It would be better to add ateach
method toDiagnosticsBuilder
, so instead of:we'd use
err.teach("...")
cc @estebank
r? @michaelwoerister