Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update futures to 0.3.1 #1805

Closed
wants to merge 1 commit into from

Conversation

martell
Copy link

@martell martell commented Nov 21, 2019

SpawnExt should take &self as their base traits
rust-lang/futures-rs#1959

Motivation

It seems that we might be cutting a new alpha soon ™️ #1708
We should probably use futures 0.3.1 because various libs that have been moving to the futures 0.3 like hyper, actix-net etc are on 0.3.1.
Building 2 versions of futures to include tokio when the alpha is cut would not be ideal

Solution

Update from futures 0.3.0 -> 0.3.1

- SpawnExt should take &self as their base traits
rust-lang/futures-rs#1959
@carllerche
Copy link
Member

Could you explain why the change is necessary? Tokio does not use the Spawn trait and cargo will happily bump users to 0.3.1.

@martell
Copy link
Author

martell commented Nov 21, 2019

Hey @carllerche, maybe I am misunderstanding how semver works with cargo deps?

Assumption :
0.3.0 will only build as 0.3.0
^0.3.0 is >=0.3.0 <0.4.0 // but we probably don't want to do this incase of breaking changes?
0.3.1 will only build as 0.3.1

If another crate uses futures @ 0.3.1 at the same time as using tokio (currently from master) will it build both futures 0.3.0 and futures 0.3.1 ?

If so I presume that is very undesirable for build time and maybe undesirable for stripping at link time?

@carllerche
Copy link
Member

without a sigil, Cargo defaults to any "semver compatible" version, so that includes 0.3.1.

Cheers,

@carllerche carllerche closed this Nov 21, 2019
@martell
Copy link
Author

martell commented Nov 21, 2019

Ahh Thank You. Sorry for the noise.
I eventually found it noted somewhere, in the rust book 🤦‍♂

For anyone else who runs into this in the future 😄
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-cratesio

Specifically the passage that says

The string "0.1.12" is a semver version requirement. Since this string does not have any operators in it, it is interpreted the same way as if we had specified "^0.1.12", which is called a caret requirement.

@martell martell deleted the update-futures-to-0-3-1 branch November 21, 2019 06:04
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.

None yet

2 participants