build(deps): sha2 0.11 in the desktop application, with the hex formatting it breaks - #74
Merged
Merged
Conversation
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.9 to 0.11.0. - [Commits](RustCrypto/hashes@sha2-v0.10.9...sha2-v0.11.0) --- updated-dependencies: - dependency-name: sha2 dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…tting it breaks Supersedes #71, which bumped the dependency alone and could not compile. sha2 0.11 moves to digest 0.11 and hybrid-array 0.4, so Digest::finalize() returns hybrid_array::Array rather than the old GenericArray. That type does not implement LowerHex, so every `format!("{:x}", ..)` over a digest stopped compiling: two in diann.rs, one in thermo.rs, one in a diann test. All four go through a new components::hex. The output is unchanged, which is the point: these strings are compared against the published SHA-256 checksums of the DIA-NN and ThermoRawFileParser downloads, and one is the name of the library cache directory, so a different spelling would reject good downloads and miss every existing cache entry. A test pins the helper against the canonical SHA-256 vectors for the empty input and "abc", plus zero padding and the empty case. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #71, which bumped the dependency on its own and could not compile. This carries Dependabot's commit unchanged and adds the code change it needs.
Why #71 failed
sha20.11 moves todigest0.11 andhybrid-array0.4, soDigest::finalize()returnshybrid_array::Arrayrather than the oldGenericArray. That type does not implementLowerHex, so everyformat!("{:x}", ..)over a digest stopped compiling:Four sites, all in the desktop crate:
diann.rs703 and 946,thermo.rs555, and one in adianntest. The engine is unaffected, it hashes with blake3. Only thedesktop appjob failed on #71; everything else passed.The change
All four go through a new
components::hex. The output is unchanged, and that is the point: two of these strings are compared against the published SHA-256 checksums of the DIA-NN and ThermoRawFileParser downloads, and one is the name of the library cache directory. A different spelling would reject good downloads and miss every existing cache entry, silently.A test pins the helper against the canonical SHA-256 vectors for the empty input and
"abc", plus zero padding and the empty case, so the spelling cannot drift again.Checks
cargo fmt,cargo clippy --all-targets -- -D warningsandcargo test --lib(83, one new) all clean against sha2 0.11.Close #71 when this merges.
🤖 Generated with Claude Code