Skip to content

Update hash algorithm for Rust >= 1.85#139

Merged
jyn514 merged 1 commit intoholmgr:masterfrom
JohnCMoon:new-hash-fix
Apr 14, 2025
Merged

Update hash algorithm for Rust >= 1.85#139
jyn514 merged 1 commit intoholmgr:masterfrom
JohnCMoon:new-hash-fix

Conversation

@JohnCMoon
Copy link
Contributor

Fixes #138.

@jyn514
Copy link
Collaborator

jyn514 commented Apr 13, 2025

thanks for the PR :) this seems roughly on the right track but it needs a couple tweaks.

Check both old and new hash algorithms and keep artifacts if they are
built with either.
@JohnCMoon
Copy link
Contributor Author

@jyn514, I took another pass at this and tested locally - I think it's ready for review.

Copy link
Collaborator

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

thanks :) lgtm with the comment addressed

@jyn514 jyn514 merged commit 4ac76bc into holmgr:master Apr 14, 2025
9 checks passed
@JohnCMoon JohnCMoon deleted the new-hash-fix branch April 14, 2025 01:32
@reneleonhardt
Copy link

@JohnCMoon Can master be released so Rust edition 2024 users can benefit from cargo-sweep? 🙂

@JohnCMoon
Copy link
Contributor Author

@reneleonhardt, I'm not a maintainer on this project, but agree a release would be helpful. @jyn514 , what do you think?

@tjol
Copy link

tjol commented Oct 1, 2025

I just wanted to say that it would be great if somebody who is able to make a release (@jyn514? @marcospb19?) found the time to publish a new version to crates.io, specifically for this change.

@marcospb19
Copy link
Collaborator

Hi @tjol, I tried doing so, but got this error:

$ cargo publish --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `rustc-stable-hash` does not specify a version
...

We are using this commit of rustc-stable-hash: rust-lang/rustc-stable-hash@3805516, that needs to be released, at the time of writing, their last release was done 7 months ago and doesn't include that commit.

So, can't do it yet.

@tjol
Copy link

tjol commented Oct 6, 2025

Thanks for the update, @marcospb19

@JohnMoon-Voyager
Copy link

@marcospb19, looking at rustc-stable-hash, it appears the commit you linked is included in releases since v0.1.0. I believe you can just switch to the latest release (0.1.2) and things should work fine. I tried locally and all cargo test runs pass.

@marcospb19
Copy link
Collaborator

XD thanks @JohnMoon-Voyager for double checking and catching my error, I missed the "2024" part, thought that was from this year's July, not last year's.

Done!

https://github.com/holmgr/cargo-sweep/releases/tag/v0.8.0
https://crates.io/crates/cargo-sweep

@reneleonhardt
Copy link

Only a typo fix has been merged since then, 0.1.2 wasn't working?
rust-lang/rustc-stable-hash@v0.1.2...main

@marcospb19
Copy link
Collaborator

marcospb19 commented Oct 12, 2025

@reneleonhardt the new release is already out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo sweep -i does not work with Rust 1.85+

6 participants