mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-22 21:25:27 +00:00
[ty] Gracefully handle salsa cancellations and panics in background request handlers (#18254)
This commit is contained in:
parent
d51f6940fe
commit
d8216fa328
9 changed files with 146 additions and 95 deletions
|
|
@ -41,13 +41,7 @@ pub(super) fn compute_diagnostics(
|
|||
return vec![];
|
||||
};
|
||||
|
||||
let diagnostics = match db.check_file(file) {
|
||||
Ok(diagnostics) => diagnostics,
|
||||
Err(cancelled) => {
|
||||
tracing::info!("Diagnostics computation {cancelled}");
|
||||
return vec![];
|
||||
}
|
||||
};
|
||||
let diagnostics = db.check_file(file);
|
||||
|
||||
diagnostics
|
||||
.as_slice()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue