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

Deprecate Events::oldest_id #15658

Merged

Conversation

urben1680
Copy link
Contributor

@urben1680 urben1680 commented Oct 4, 2024

Objective

Fixes #15617

Solution

The original author confirmed it was not intentional that both these methods exist.

They do the same, one has the better implementation and the other the better name.

Testing

I just ran the unit tests of the module.


Migration Guide

  • Change usages of Events::oldest_id to Events::oldest_event_count
  • If Events::oldest_id was used to get the actual oldest EventId::id, note that the deprecated method never reliably did that in the first place as the buffers may contain no id currently.

Copy link
Contributor

@ItsDoot ItsDoot left a comment

Choose a reason for hiding this comment

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

Don't forget to update the PR title.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Oct 5, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 5, 2024
Merged via the queue into bevyengine:main with commit 2e89e98 Oct 5, 2024
31 checks passed
@urben1680 urben1680 deleted the deprecate-Events-oldest_id branch November 6, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Events::oldest_event_count and Events::oldest_id don't make the difference to each other clear enough
3 participants