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

Move Duration and Instant from bevy_utils to bevy_time, resulting in additional bevy_time_plugin crate #6034

Closed
wants to merge 10 commits into from

Conversation

targrub
Copy link
Contributor

@targrub targrub commented Sep 20, 2022

Objective

  • Describe the objective or issue this PR addresses.

Fixes #6027.

Solution

  • Describe the solution used to achieve the objective above.

Changelog

This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section.

  • What changed as a result of this PR?
  • If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
  • Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section
    • If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge!

Migration Guide

Clients of Instant and/or Duration will need to change from getting them from bevy_utils to bevy_time or from bevy::utils to bevy::time.
Clients of TimePlugin will need to change from getting it from bevy_time to bevy_time_plugin.

targrub and others added 10 commits September 19, 2022 14:46
…vents in bevy_input. Added PartialEq trait to bevy_input events without it.
…erde an optional dependency. Added conditional #derives for necessary types in bevy_window.
…ed crate bevy_time_plugin to avoid circular dependency with bevy_app. Several crate that depended on bevy_utils::{Duration, Instant} now will use bevy_time::{Duration, Instant}. bevy_reflect depends on the instant crate for Duration and Instant. as does bevy_time. bevy_render added a dependency on bevy_time_plugin. examples now will use time::Duration rather than utils::Duration.
@targrub
Copy link
Contributor Author

targrub commented Sep 20, 2022

This PR is supposed to be only the commits after commit: 807fbcf above.

@Nilirad Nilirad added 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 A-Time Involves time keeping and reporting A-Utils Utility functions and types labels Sep 20, 2022
@mockersf
Copy link
Member

needing an additional crate for time seems to be too big a side effect of that move 😞

@targrub
Copy link
Contributor Author

targrub commented Sep 20, 2022

needing an additional crate for time seems to be too big a side effect of that move 😞

Maybe, but just to note, it's only a single .rs file of 150 lines, half of them for a test, which is simply code moved from bevy_time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Time Involves time keeping and reporting A-Utils Utility functions and types 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duration and Instant should live in bevy_time, not bevy_utils
4 participants