mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
Use fixed hash width for ty_server
diagnostics (#19766)
Summary
--
Fixes a snapshot test failure I saw in #19653 locally and in Windows CI
by
padding the hex ID to 16 digits to match the regex in
`filter_result_id`.
78e5fe0a51/crates/ty_server/tests/e2e/pull_diagnostics.rs (L380-L384)
Test Plan
--
I applied this to the branch from #19653 locally and saw that the tests
now
pass. I couldn't reproduce this failure directly on `main` or this
branch,
though.
This commit is contained in:
parent
4090297a11
commit
2db4e5dbea
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ impl Diagnostics<'_> {
|
||||||
// Hash the length first to ensure different numbers of diagnostics produce different hashes
|
// Hash the length first to ensure different numbers of diagnostics produce different hashes
|
||||||
diagnostics.hash(&mut hasher);
|
diagnostics.hash(&mut hasher);
|
||||||
|
|
||||||
Some(format!("{:x}", hasher.finish()))
|
Some(format!("{:016x}", hasher.finish()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the result ID for the diagnostics.
|
/// Computes the result ID for the diagnostics.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue