Skip to content

Update sha1 to version 0.11.0 and rand to version 0.10.0#529

Open
LilithSilver wants to merge 1 commit intosnapview:masterfrom
LilithSilver:patch-1
Open

Update sha1 to version 0.11.0 and rand to version 0.10.0#529
LilithSilver wants to merge 1 commit intosnapview:masterfrom
LilithSilver:patch-1

Conversation

@LilithSilver
Copy link
Copy Markdown

@LilithSilver LilithSilver commented Jan 7, 2026

The main release version of sha1 has an issue where the deeply-nested dependency generic-array still includes doc_auto_cfg, which is deprecated in rust nightly. Recent docs.rs builds fail when the old version is included. This bumps the version to stop the issue.

rand has a similar issue.

I've managed to request updates from all other upstream nested dependencies; those aren't pre-release versions, so Cargo should be able to update them OK.

@LilithSilver LilithSilver changed the title Update sha1 dependency to version 0.11.0-rc.3 Update sha1 to version 0.11.0-rc.3 and rand to version 0.10.0-rc.6 Jan 7, 2026
@daniel-abramov
Copy link
Copy Markdown
Member

I think I'd rather wait for a stable release should this become necessary. Using the release candidate version is not encouraged, especially in [somewhat popular] libraries.

@LilithSilver
Copy link
Copy Markdown
Author

I think I'd rather wait for a stable release should this become necessary. Using the release candidate version is not encouraged, especially in [somewhat popular] libraries.

I generally agree; but docs.rs will fail to build for any users (or tungstenite itself) until those packages are updated...

Good news, rand released 0.10.0, so I committed that. sha1 hasn't had a major release in over 2 years though, although they do frequently post rc builds.

@daniel-abramov
Copy link
Copy Markdown
Member

I generally agree; but docs.rs will fail to build for any users (or tungstenite itself) until those packages are updated...

Hm... tungstenite builds without any issues with +nightly. Do I miss something? (Perhaps I misunderstood the issue?)

@LilithSilver
Copy link
Copy Markdown
Author

Hm... tungstenite builds without any issues with +nightly. Do I miss something? (Perhaps I misunderstood the issue?)

Apologies, I missed an important thing.

The downstream packages that fail rely on the following rustdoc/rustc args, as described here.

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]

This can be simulated by putting this inside of Tungstenite's Cargo.toml in the proper location, then run the docs-rs build. (with cargo docs-rs provided by https://github.com/dtolnay/cargo-docs-rs).

Since Tungstenite doesn't use those cfg features, the issue won't present itself on this package's build, only packages that use Tungstenite and rely on those features to build their docs.

@LilithSilver
Copy link
Copy Markdown
Author

Not sure why the cargo check CI is failing due to a rand feature mismatch... cargo check, build, etc runs OK on my machine, and I don't see the getrandom feature mentioned anywhere in tungstenite.
image

@LilithSilver LilithSilver changed the title Update sha1 to version 0.11.0-rc.3 and rand to version 0.10.0-rc.6 Update sha1 to version 0.11.0-rc.3 and rand to version 0.10.0 Mar 3, 2026
@daniel-abramov
Copy link
Copy Markdown
Member

Yes, the errors were unrelated and fixed in master, you might want to rebase.

I confirm that I can reproduce the error when using the flags. This is an interesting issue; I might need to research how other packages have dealt with it and what's the best way to address it (judging from the linked/mentioned issues the problem must have affected multiple popular crates), . I'm (typically) a bit uncomfortable being dependent on *rc* releases of other crates, though it seems like sha1 is a bit unconventional for releases/tagging. Maybe we could even consider an alternative crate.

@LilithSilver LilithSilver changed the title Update sha1 to version 0.11.0-rc.3 and rand to version 0.10.0 Update sha1 to version 0.11.0 and rand to version 0.10.0 Apr 7, 2026
author LilithSilver <84940819+LilithSilver@users.noreply.github.com> 1767816227 -0800
committer Lilith Silver <84940819+LilithSilver@users.noreply.github.com> 1775589812 -0700

Update sha1 dependency to version 0.11.0-rc.3

Update rand dependency to version 0.10.0-rc.6

Update rand dependency version to 0.10.0

Update sha1 dependency version to 0.11.0

Update rand dependency to version 0.10.0-rc.6

Update rand dependency version to 0.10.0

Update sha1 dependency version to 0.11.0
@LilithSilver
Copy link
Copy Markdown
Author

@daniel-abramov

Good news, looks like sha1 0.11 finally released, so problem solved! I rebased, squashed, and pushed.

@daniel-abramov
Copy link
Copy Markdown
Member

Yep, thanks for the update. I saw the update in 0.11, the only problem that I see is that MSRV of the 0.11 version is 1.85 (February 2025), which is much newer than the current MSRV of 1.71 (August 2019). I'm usually not against raising our MSRV, but 1.71 -> 1.85 is a very large step that's gonna have implications for downstream crates (for instance, latest axum uses 1.78 and their main is 1.80).

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.

2 participants