Skip to content

Commit

Permalink
Update minimum version of futures-util
Browse files Browse the repository at this point in the history
This is a complicated one. There was a soundness bug in futures-task
rust-lang/futures-rs#2795 so it was fixed in a
point release (0.3.31) even though it's a breaking change.

But other crates, including futures-util, weren't updated to "depend on"
the newer release, even though they now don't compile against the older
release.

This suddenly broke the cotton-minver build, which used the old
futures-util 0.3.11 (because it *directly* depends on it) but the new
futures-task 0.3.31 (because it only *indirectly* depends on it, and the
minver build does direct-minimal-versions only).

Fix this by depending on a later version of futures-util.
  • Loading branch information
pdh11 committed Oct 5, 2024
1 parent 20d2218 commit b7dbf59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cotton-netif/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tokio = { version = "1.24", default-features = false, features = [
"rt",
], optional = true }
tokio-test = { version = "0.4", default-features = false, optional = true }
futures-util = { version = "0.3", default-features = false, features = [
futures-util = { version = "0.3.31", default-features = false, features = [
"async-await",
"async-await-macro",
], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion cotton-ssdp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tokio = { version = "1.24", default-features = false, features = [
], optional = true }
tokio-stream = { version = "0.1.2", default-features = false, optional = true }
futures = { version = "0.3", default-features = false, optional = true }
futures-util = { version = "0.3", default-features = false, features = [
futures-util = { version = "0.3.31", default-features = false, features = [
"async-await",
"async-await-macro",
], optional = true }
Expand Down

2 comments on commit b7dbf59

@taiki-e
Copy link

@taiki-e taiki-e commented on b7dbf59 Oct 6, 2024

Choose a reason for hiding this comment

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

Sorry for the breakage!

But other crates, including futures-util, weren't updated to "depend on"
the newer release, even though they now don't compile against the older
release.

No, futures-util 0.3.31 requires futures-task 0.3.31+. The problem here is in old futures-util, for example 0.3.30 requires futures-task 0.3.30+ so you will encounter the problem if you try to partially raise versions of futures-* not all at once.

I yanked futures-util 0.3.30 and older, so I think this issue will be fixed.

@pdh11
Copy link
Owner Author

@pdh11 pdh11 commented on b7dbf59 Oct 8, 2024

Choose a reason for hiding this comment

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

Aha, oops, I'm not sure I realised that just mentioning your crate would notify you. Sounds like it was a sticky situation and you did the right thing!

Please sign in to comment.