-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 async-executor to 1.3.0 (urgent) #526
Conversation
Oh, I forgot to add - And, by the way, I have noticed your API is at least somewhat inspired by Here you can see a nice example combining |
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.
I hit this error this morning and came looking for why Bevy 0.2.0 was suddenly broken. (Thanks @stjepang for following up with the fix!)
I confirmed that this now builds and a bunch of examples I spot-checked (breakout, etc.) all worked correctly.
I suggest merging this and putting out 0.2.1 to unbreak the world.
Just created, #532 will close :). |
Has anyone got an idea of why the Cargo.lock was not enough to protect the bevy crate itself from this breakage ? (I understand that it doesn’t protect users of the crate, that have their own Cargo.lock) |
Looks good. Thanks for the quick responses! |
@navaati Libraries like Bevy do not include Cargo.lock as a general rule, so it can't protect from this sort of problem. This is why the Rust ecosystem takes semantic versioning very seriously -- things break otherwise. If libraries included their own For more info on that subject check out the Cargo.toml vs Cargo.lock chapter of The Cargo Book. |
For anyone who stumbles on this issue wondering what went wrong:
The easiest fix until this PR is merged is to add this as a dependency to your
Cargo.toml
:Hey, I sneaked in a small breaking change into
async-executor
without respecting semantic versioning rules.The change is to parametrize executors over a lifetime, i.e. turn
Executor
intoExecutor<'a>
. This way, we can have non-static executors, spawn non-static futures, and await their non-static results! :)Rather than bumping
async-executor
to v2.0, I chose to sneak in the breaking change into v1.3.0 for the following reasons:async-executor
v1.x is still very new and few projects are using it.smol
to go v2.0 too, thus creating a lot of churn.The short story is: respecting semver rules would overall cause us more pain that just merging this one pull request. The other affected project,
async-global-executor
, is already fixed).Anyways, apologies for that! I hope you can just quickly merge this in and move on :)
Cheers! This looks like a cool project, I'm actually gonna go look what's inside...
TL;DR for anyone whose code is broken right now: add
async-executor = "=1.2.0"
toCargo.toml
as a temporary workaround.