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

[Merged by Bors] - Mark Task as #[must_use] #6068

Closed
wants to merge 2 commits into from

Conversation

tim-blackbird
Copy link
Contributor

The async_executor::Task that it wraps is also #[must_use] with the same message.

Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

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

Since this would be a breaking change could you write a migration guide?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot pushed a commit that referenced this pull request Sep 22, 2022
The `async_executor::Task` that it wraps is also `#[must_use]` with the same message.

Co-authored-by: devil-ira <[email protected]>
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Tasks Tools for parallel and async work M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Sep 22, 2022
@alice-i-cecile
Copy link
Member

Not technically breaking as it only enables a lint, but I agree on the migration guide.

@IceSentry
Copy link
Contributor

Well, our CI broke because of a new lint 😉, but yeah, technically the code would still compile so I guess it doesn't count.

@tim-blackbird
Copy link
Contributor Author

Not sure what I'd write in the guide.
If I understand it correctly, any code that would trigger this lint wasn't working/doing anything, since the task would be dropped and canceled immediately.
I guess I could write "Hey, your code is broken.", but the muse_use message kinda already does that.

@alice-i-cecile
Copy link
Member

I guess I could write "Hey, your code is broken.", but the muse_use message kinda already does that.

Point taken. Don't worry about it.

@alice-i-cecile alice-i-cecile removed the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Sep 22, 2022
@IceSentry
Copy link
Contributor

Yeah, at first I thought it was a compile error which is why I asked for a migration guide, but since it's just a lint for something that was simply not working before it's less of an issue.

@bors bors bot changed the title Mark Task as #[must_use] [Merged by Bors] - Mark Task as #[must_use] Sep 22, 2022
@bors bors bot closed this Sep 22, 2022
@tim-blackbird tim-blackbird deleted the must-use-task branch September 22, 2022 17:49
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 19, 2022
The `async_executor::Task` that it wraps is also `#[must_use]` with the same message.

Co-authored-by: devil-ira <[email protected]>
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
The `async_executor::Task` that it wraps is also `#[must_use]` with the same message.

Co-authored-by: devil-ira <[email protected]>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
The `async_executor::Task` that it wraps is also `#[must_use]` with the same message.

Co-authored-by: devil-ira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants