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:
Brent Westbrook 2025-08-05 10:55:17 -04:00 committed by GitHub
parent 4090297a11
commit 2db4e5dbea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.