Skip to content

chore: bump sha & md-5 to 0.11.0#21840

Merged
alamb merged 2 commits intoapache:mainfrom
Jefffrey:bump-md5-sha
Apr 27, 2026
Merged

chore: bump sha & md-5 to 0.11.0#21840
alamb merged 2 commits intoapache:mainfrom
Jefffrey:bump-md5-sha

Conversation

@Jefffrey
Copy link
Copy Markdown
Contributor

@Jefffrey Jefffrey commented Apr 25, 2026

Which issue does this PR close?

Rationale for this change

Keep dependencies up to date.

What changes are included in this PR?

We used to use Digest from blake2, which was a common dependency used by md5 and sha2; however blake2 doesn't have a 0.11.0 release so we were blocked because of incompatible dependencies when trying to upgrade sha2 or md5. Fix code to use their own Digest (e.g. md5::Digest, sha2::Digest) instead of relying on blake2::Digest which should prevent such issues from occurring again and allows us to bump their versions independently.

Are these changes tested?

Existing tests.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the functions Changes to functions implementation label Apr 25, 2026
@Jefffrey Jefffrey marked this pull request as ready for review April 25, 2026 07:50
macro_rules! digest_to_array {
($METHOD:ident, $INPUT:expr) => {{
($MODULE:ident, $METHOD:ident, $INPUT:expr) => {{
use $MODULE::Digest;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

This is a reasonable way to handle the mixed digest versions. Another readability option would be to use UFCS, e.g. <$METHOD as $MODULE::Digest>::digest(...), so the trait version is explicit at the call site. Not necessary for this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a nice idea, though I think it makes it a bit more verbose, e.g.

ScalarValue::Binary(
    $INPUT.map(|v| <$METHOD as $MODULE::Digest>::digest(v).as_slice().to_vec()),
)

Copy link
Copy Markdown
Member

@Weijun-H Weijun-H left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @Jefffrey

@alamb alamb added this pull request to the merge queue Apr 27, 2026
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 27, 2026

Thanks @Jefffrey and @Weijun-H

Merged via the queue into apache:main with commit b11b99b Apr 27, 2026
34 checks passed
@Jefffrey Jefffrey deleted the bump-md5-sha branch April 27, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants