-
Notifications
You must be signed in to change notification settings - Fork 240
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
Upgrade to tokio 1.0 #142
Upgrade to tokio 1.0 #142
Conversation
Now that This is especially important since Also, is there any timetime on a release, and is there anything I can do to help out? |
|
Ah, TIL, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tungstenite-rs dependency needs updating, since nickelc's branch was merged into snapview and then removed.
CI fails due to: snapview/tokio-tungstenite#142 (comment)
CI fails due to: snapview/tokio-tungstenite#142 (comment)
CI fails due to: snapview/tokio-tungstenite#142 (comment)
* feat(providers): tokio 1.0 BREAKING: This removes async-std as a compatibility option * feat: tokio 1.0 in rest of crates * fix: patch Cargo.toml until deps are released * fix(contract): load ws deps * feat: bytes 1.0 (#121) * feat(core): move to bytes::Bytes * feat: adjust rest of crates to Bytes * chore: bump deps CI fails due to: snapview/tokio-tungstenite#142 (comment) * chore: use latest tokio-tungstenite * ci: split tests into jobs (#129) * Switch to `hex` (#128) * fix(core): replace rustc_hex with hex * fix(providers): replace rustc_hex with hex * chore: replace rustc-hex with hex * chore: cargo fmt * fix(ledger): copy address from string correctly * chore: fix flaky tests Fixes #105
Is there anything that's still blocking this? |
@coolreader18 currently just waiting for the This is due to input_buffer having a dependency on Technically this could be merged and released (removing the current git reference for the tungstenite dependency). That would cause crates to build with In the end it's up to the guys from snapview. Either release new versions of input_buffer and tungstenite first and then merge this, or merge now and do the upgrade of tungstenite later (eventually even before the next release). So far I was just planning to keep this as draft until the new versions are out. |
Hi @dnaka91 and others, thanks for all the work! Let's see if we can release |
Thanks for this work! In Deno, tokio-tungstenite is the last dependency we are waiting on to upgrade to Tokio 1.0. Happy to lend a hand if there's any specific work needed but it sounds like you all are just waiting on input_buffer tho? |
Hi @ry, yeah just waiting for the releases of |
|
I've asked about |
|
Thank you for the release of tungstenite 0.12 and quick update of the dependency here @application-developer-DA 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. I'd appreciate somebody else also has a look at the changes in examples/interval-server.rs
as I'm not proficient with https://docs.rs/tokio/1.0.1/tokio/macro.select.html
FWIW. I can confirm that the use of |
@@ -21,10 +21,10 @@ stream = [] | |||
log = "0.4" | |||
futures-util = { version = "0.3", default-features = false, features = ["async-await", "sink", "std"] } | |||
pin-project = "1.0" | |||
tokio = { version = "0.3", default-features = false, features = ["io-util"] } | |||
tokio = { version = "1.0.0", default-features = false, features = ["io-util"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason for pinning to 1.0.0
. Why can't it just be 1.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If semantic versioning is used properly for this, which it should be, couldn't this even be "1" as tokio is stable on 1.x.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a valid point. I mostly also specify the minor version in my apps so i didn't think of that. So, the tokio version here should just be 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, per https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements 1
, 1.0
and 1.0.0
are all equivalent.
Then it is a question of style/consistency. 1.0
would be most consistent locally (see line above). Is anybody aware of an ecosystem-wide style recommendation for equivalent version declarations in Cargo.toml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All I remember is Cargo endorses semantic versioning and the major version thats 1+.x.x
won't have any breaking changes. It's fine to use 1.0
as well for consistency and in case of local bugfixes that get added/removed due to tokio in this repo as tokio is developed/patched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @strohel mentioned 1.0.0 is equivalent to 1.x.x. the only exception to this rule are 0.x.x releases. For example 0.1.0 would be equivalent to 0.1.x.
I personally prefer the full version as it kind of is a statement to what version the project was tested with by the authors and considered to be working. So that later when an error happens only on the user side and the user states that he is using for example the auto upgraded 1.5.3 instead of 1.0.0, then it's easy to derive that the error lies in some changes of the said dependency. Or at least would be likely and a good thing to look at first.
In the end it's up to you folks from snapview. I just wanted to explain my reasoning behind putting the full version in the Cargo.toml and don't mind changing to just 1.0 or 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not pinned, this is equivalent to ^1.0.0
(docs) and will allow updates to any 1.x.x
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not pinned, this is equivalent to
^1.0.0
(docs) and will allow updates to any1.x.x
.
TIL. Thanks for informing me
* feat(providers): tokio 1.0 BREAKING: This removes async-std as a compatibility option * feat: tokio 1.0 in rest of crates * fix: patch Cargo.toml until deps are released * fix(contract): load ws deps * feat: bytes 1.0 (#121) * feat(core): move to bytes::Bytes * feat: adjust rest of crates to Bytes * chore: bump deps CI fails due to: snapview/tokio-tungstenite#142 (comment) * chore: use latest tokio-tungstenite * ci: split tests into jobs (#129) * Switch to `hex` (#128) * fix(core): replace rustc_hex with hex * fix(providers): replace rustc_hex with hex * chore: replace rustc-hex with hex * chore: cargo fmt * fix(ledger): copy address from string correctly * chore: fix flaky tests Fixes #105
Tokio 1.0 has just been released and PR updates to the latest release.
This depends on:
tungstenite
to use bytes to 1.0.tokio-native-tls
to use tokio 1.0.I will update this PR as the dependencies become ready.
Currently waiting on new release of the following crates to mark this PR as ready: