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] - Split time functionality into bevy_time #4187

Closed
wants to merge 4 commits into from

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Mar 11, 2022

Objective

Reduce the catch-all grab-bag of functionality in bevy_core by minimally splitting off time functionality into bevy_time. Functionality like that provided by #3002 would increase the complexity of bevy_time, so this is a good candidate for pulling into its own unit.

A step in addressing #2931 and splitting bevy_core into more specific locations.

Solution

Pull the time module of bevy_core into a new crate, bevy_time.

Migration guide

  • Time related types (e.g. Time, Timer, Stopwatch, FixedTimestep, etc.) should be imported from bevy::time::* rather than bevy::core::*.
  • If you were adding CorePlugin manually, you'll also want to add TimePlugin from bevy::time.
  • The bevy::core::CorePlugin::Time system label is replaced with bevy::time::TimeSystem.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Mar 11, 2022
@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change A-Core Common functionality for all bevy apps and removed S-Needs-Triage This issue needs to be labelled labels Mar 11, 2022
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 11, 2022

I definitely like reducing the chaos of our crates further!

CorePlugin still handles registering bevy_time onto the App. Pulling out a TimePlugin is likely the next step at reducing bevy_core's catchall functionality, if we want to continue down this way.

I think I like that: it would be nice to be able to swap it out or remove it for niche use cases.

@mockersf
Copy link
Member

as it is, this would increase build time as it split a new crate without increasing parallelism

@CAD97
Copy link
Contributor Author

CAD97 commented Mar 11, 2022

As it turns out, bevy_diagnostic is the only in-tree user of "bevy_time", and only uses bevy_time, not the rest of the bevy_core functionality. As such, I've gone ahead and made it depend on bevy_time directly; this also means that the compilation dependency graph is reordered and no longer strictly just a pessimization.

I can pull out a TimePlugin in this PR, but doing enough to make bevy_core no longer use bevy_time seems a bit much for one PR? Obviously that'd be the follow-up.

@alice-i-cecile
Copy link
Member

I can pull out a TimePlugin in this PR, but doing enough to make bevy_core no longer use bevy_time seems a bit much for one PR? Obviously that'd be the follow-up.

Alright, sounds good to me.

@CAD97
Copy link
Contributor Author

CAD97 commented Mar 11, 2022

Things continue to be easier to do than I expect (and that's a good thing! Good job everyone!) so I just went all the way to separate bevy_time from bevy_core. I am honestly surprised at how little actually needed to change to pull TimePlugin out of CorePlugin.

@alice-i-cecile alice-i-cecile added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Mar 11, 2022
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.

Small nit about system timing: I think this fixes an existing bug, but I'd rather not let it continue now that I've seen it.

Other than that, this LGTM: the port went very smoothly, I don't see any mistakes and I'm pretty firmly in favor of the general direction of splitting out bevy_core into more useful parts.

Cart, if and when you merge this, please add a A - Time label.

@CAD97
Copy link
Contributor Author

CAD97 commented Mar 11, 2022

Only CI error seems unrelated

error[B004]: found 2 duplicate entries for crate 'wasi'
    ┌─ /home/runner/work/bevy/bevy/Cargo.lock:296:1
    │  
296 │ ╭ wasi 0.10.2+wasi-snapshot-preview1 registry+https://github.com/rust-lang/crates.io-index
297 │ │ wasi 0.11.0+wasi-snapshot-preview1 registry+https://github.com/rust-lang/crates.io-index
    │ ╰────────────────────────────────────────────────────────────────────────────────────────^ lock entries
tree
    = wasi v0.10.2+wasi-snapshot-preview1
      └── getrandom v0.2.5
          ├── ahash v0.7.6
          │   ├── bevy_utils v0.6.0
          │   │   ├── bevy_app v0.6.0
          │   │   │   ├── bevy_asset v0.6.0
          │   │   │   │   ├── bevy_audio v0.6.0
          │   │   │   │   │   └── bevy_internal v0.6.0
          │   │   │   │   │       ├── bevy v0.6.0
          │   │   │   │   │       ├── bevy v0.6.0 (*)
          │   │   │   │   │       ├── (dev) bevy_audio v0.6.0 (*)
          │   │   │   │   │       └── (dev) bevy_log v0.6.0
          │   │   │   │   │           ├── (dev) bevy_app v0.6.0 (*)
          │   │   │   │   │           ├── bevy_asset v0.6.0 (*)
          │   │   │   │   │           ├── bevy_diagnostic v0.6.0
          │   │   │   │   │           │   ├── bevy_asset v0.6.0 (*)
          │   │   │   │   │           │   └── bevy_internal v0.6.0 (*)
          │   │   │   │   │           ├── bevy_gltf v0.6.0
          │   │   │   │   │           │   └── bevy_internal v0.6.0 (*)
          │   │   │   │   │           ├── bevy_internal v0.6.0 (*)
          │   │   │   │   │           ├── bevy_sprite v0.6.0
          │   │   │   │   │           │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   │           │   ├── bevy_text v0.6.0
          │   │   │   │   │           │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   │           │   │   └── bevy_ui v0.6.0
          │   │   │   │   │           │   │       └── bevy_internal v0.6.0 (*)
          │   │   │   │   │           │   └── bevy_ui v0.6.0 (*)
          │   │   │   │   │           └── bevy_ui v0.6.0 (*)
          │   │   │   │   ├── bevy_core_pipeline v0.6.0
          │   │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   │   ├── bevy_pbr v0.6.0
          │   │   │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   │   │   └── bevy_internal v0.6.0 (*)
          │   │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   ├── bevy_render v0.6.0
          │   │   │   │   │   ├── bevy_core_pipeline v0.6.0 (*)
          │   │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   │   │   ├── bevy_scene v0.6.0
          │   │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   │   └── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   │   ├── bevy_audio v0.6.0 (*)
          │   │   │   ├── bevy_core v0.6.0
          │   │   │   │   ├── (dev) bevy_asset v0.6.0 (*)
          │   │   │   │   ├── bevy_core_pipeline v0.6.0 (*)
          │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   │   ├── bevy_core_pipeline v0.6.0 (*)
          │   │   │   ├── bevy_diagnostic v0.6.0 (*)
          │   │   │   ├── bevy_gilrs v0.6.0
          │   │   │   │   └── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   ├── bevy_input v0.6.0
          │   │   │   │   ├── bevy_gilrs v0.6.0 (*)
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_ui v0.6.0 (*)
          │   │   │   │   └── bevy_winit v0.6.0
          │   │   │   │       └── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_log v0.6.0 (*)
          │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   ├── bevy_scene v0.6.0 (*)
          │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   ├── bevy_time v0.6.0
          │   │   │   │   ├── bevy_diagnostic v0.6.0 (*)
          │   │   │   │   └── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_transform v0.6.0
          │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   │   ├── bevy_scene v0.6.0 (*)
          │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   │   ├── bevy_ui v0.6.0 (*)
          │   │   │   ├── bevy_window v0.6.0
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   ├── bevy_ui v0.6.0 (*)
          │   │   │   │   └── bevy_winit v0.6.0 (*)
          │   │   │   └── bevy_winit v0.6.0 (*)
          │   │   ├── bevy_asset v0.6.0 (*)
          │   │   ├── bevy_audio v0.6.0 (*)
          │   │   ├── bevy_core v0.6.0 (*)
          │   │   ├── bevy_core_pipeline v0.6.0 (*)
          │   │   ├── bevy_diagnostic v0.6.0 (*)
          │   │   ├── bevy_ecs v0.6.0
          │   │   │   ├── bevy_app v0.6.0 (*)
          │   │   │   ├── bevy_asset v0.6.0 (*)
          │   │   │   ├── bevy_audio v0.6.0 (*)
          │   │   │   ├── bevy_core v0.6.0 (*)
          │   │   │   ├── bevy_core_pipeline v0.6.0 (*)
          │   │   │   ├── bevy_diagnostic v0.6.0 (*)
          │   │   │   ├── bevy_gilrs v0.6.0 (*)
          │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   ├── bevy_input v0.6.0 (*)
          │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   ├── bevy_scene v0.6.0 (*)
          │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   ├── bevy_time v0.6.0 (*)
          │   │   │   ├── bevy_transform v0.6.0 (*)
          │   │   │   ├── bevy_ui v0.6.0 (*)
          │   │   │   ├── bevy_window v0.6.0 (*)
          │   │   │   └── bevy_winit v0.6.0 (*)
          │   │   ├── bevy_gilrs v0.6.0 (*)
          │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   ├── bevy_input v0.6.0 (*)
          │   │   ├── bevy_internal v0.6.0 (*)
          │   │   ├── bevy_log v0.6.0 (*)
          │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   ├── bevy_reflect v0.6.0
          │   │   │   ├── bevy_app v0.6.0 (*)
          │   │   │   ├── bevy_asset v0.6.0 (*)
          │   │   │   ├── bevy_audio v0.6.0 (*)
          │   │   │   ├── bevy_core v0.6.0 (*)
          │   │   │   ├── bevy_ecs v0.6.0 (*)
          │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   ├── bevy_math v0.6.0
          │   │   │   │   ├── bevy_core v0.6.0 (*)
          │   │   │   │   ├── bevy_gltf v0.6.0 (*)
          │   │   │   │   ├── bevy_input v0.6.0 (*)
          │   │   │   │   ├── bevy_internal v0.6.0 (*)
          │   │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   │   ├── bevy_transform v0.6.0 (*)
          │   │   │   │   ├── bevy_ui v0.6.0 (*)
          │   │   │   │   ├── bevy_window v0.6.0 (*)
          │   │   │   │   └── bevy_winit v0.6.0 (*)
          │   │   │   ├── bevy_pbr v0.6.0 (*)
          │   │   │   ├── bevy_render v0.6.0 (*)
          │   │   │   ├── bevy_scene v0.6.0 (*)
          │   │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   │   ├── bevy_text v0.6.0 (*)
          │   │   │   ├── bevy_time v0.6.0 (*)
          │   │   │   ├── bevy_transform v0.6.0 (*)
          │   │   │   └── bevy_ui v0.6.0 (*)
          │   │   ├── bevy_render v0.6.0 (*)
          │   │   ├── bevy_scene v0.6.0 (*)
          │   │   ├── bevy_sprite v0.6.0 (*)
          │   │   ├── bevy_text v0.6.0 (*)
          │   │   ├── bevy_time v0.6.0 (*)
          │   │   ├── bevy_transform v0.6.0 (*)
          │   │   ├── bevy_ui v0.6.0 (*)
          │   │   ├── bevy_window v0.6.0 (*)
          │   │   └── bevy_winit v0.6.0 (*)
          │   └── hashbrown v0.11.2
          │       ├── bevy_utils v0.6.0 (*)
          │       ├── gpu-descriptor v0.2.2
          │       │   └── wgpu-hal v0.12.4
          │       │       ├── wgpu v0.12.0
          │       │       │   └── bevy_render v0.6.0 (*)
          │       │       ├── wgpu-core v0.12.2
          │       │       │   ├── wgpu v0.12.0 (*)
          │       │       │   └── wgpu v0.12.0 (*)
          │       │       ├── wgpu-core v0.12.2 (*)
          │       │       ├── wgpu-core v0.12.2 (*)
          │       │       ├── wgpu-core v0.12.2 (*)
          │       │       └── wgpu-core v0.12.2 (*)
          │       └── indexmap v1.8.0
          │           ├── naga v0.8.5
          │           │   ├── bevy_render v0.6.0 (*)
          │           │   ├── wgpu v0.12.0 (*)
          │           │   ├── wgpu v0.12.0 (*)
          │           │   ├── wgpu-core v0.12.2 (*)
          │           │   └── wgpu-hal v0.12.4 (*)
          │           ├── petgraph v0.6.0
          │           │   └── naga v0.8.5 (*)
          │           ├── serde_yaml v0.8.23
          │           │   └── insta v0.16.1
          │           │       └── (dev) bevy_crevice v0.6.0
          │           │           └── bevy_render v0.6.0 (*)
          │           └── toml v0.5.8
          │               ├── cargo-manifest v0.2.6
          │               │   └── bevy_macro_utils v0.6.0
          │               │       ├── bevy-crevice-derive v0.6.0
          │               │       │   └── bevy_crevice v0.6.0 (*)
          │               │       ├── bevy_derive v0.6.0
          │               │       │   ├── bevy_app v0.6.0 (*)
          │               │       │   ├── bevy_core v0.6.0 (*)
          │               │       │   ├── bevy_internal v0.6.0 (*)
          │               │       │   ├── bevy_render v0.6.0 (*)
          │               │       │   ├── bevy_ui v0.6.0 (*)
          │               │       │   └── bevy_utils v0.6.0 (*)
          │               │       ├── bevy_ecs_macros v0.6.0
          │               │       │   └── bevy_ecs v0.6.0 (*)
          │               │       └── bevy_reflect_derive v0.6.0
          │               │           └── bevy_reflect v0.6.0 (*)
          │               └── proc-macro-crate v1.1.3
          │                   ├── ndk-macro v0.3.0
          │                   │   ├── ndk-glue v0.5.1
          │                   │   │   ├── bevy_asset v0.6.0 (*)
          │                   │   │   ├── bevy_internal v0.6.0 (*)
          │                   │   │   └── winit v0.26.1
          │                   │   │       ├── bevy_winit v0.6.0 (*)
          │                   │   │       └── bevy_winit v0.6.0 (*)
          │                   │   └── ndk-glue v0.6.1
          │                   │       ├── cpal v0.13.5
          │                   │       │   └── rodio v0.15.0
          │                   │       │       ├── bevy_audio v0.6.0 (*)
          │                   │       │       └── bevy_audio v0.6.0 (*)
          │                   │       └── oboe v0.4.5
          │                   │           └── cpal v0.13.5 (*)
          │                   └── num_enum_derive v0.5.7
          │                       └── num_enum v0.5.7
          │                           ├── ndk v0.5.0
          │                           │   ├── ndk-glue v0.5.1 (*)
          │                           │   └── winit v0.26.1 (*)
          │                           └── ndk v0.6.0
          │                               ├── cpal v0.13.5 (*)
          │                               ├── ndk-glue v0.6.1 (*)
          │                               └── oboe v0.4.5 (*)
          ├── bevy_utils v0.6.0 (*)
          ├── rand_core v0.6.3
          │   ├── rand v0.8.5
          │   │   ├── (dev) bevy v0.6.0 (*)
          │   │   ├── bevy_asset v0.6.0 (*)
          │   │   └── (dev) bevy_ecs v0.6.0 (*)
          │   └── rand_chacha v0.3.1
          │       └── rand v0.8.5 (*)
          └── uuid v0.8.2
              ├── bevy_reflect_derive v0.6.0 (*)
              ├── bevy_scene v0.6.0 (*)
              ├── bevy_utils v0.6.0 (*)
              ├── bevy_utils v0.6.0 (*)
              ├── gilrs v0.8.2
              │   └── bevy_gilrs v0.6.0 (*)
              └── gilrs-core v0.3.2
                  └── gilrs v0.8.2 (*)
    = wasi v0.11.0+wasi-snapshot-preview1
      └── mio v0.8.1
          └── winit v0.26.1
              ├── bevy_winit v0.6.0
              │   └── bevy_internal v0.6.0
              │       ├── bevy v0.6.0
              │       ├── bevy v0.6.0 (*)
              │       ├── (dev) bevy_audio v0.6.0
              │       │   └── bevy_internal v0.6.0 (*)
              │       └── (dev) bevy_log v0.6.0
              │           ├── (dev) bevy_app v0.6.0
              │           │   ├── bevy_asset v0.6.0
              │           │   │   ├── bevy_audio v0.6.0 (*)
              │           │   │   ├── bevy_core_pipeline v0.6.0
              │           │   │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   │   ├── bevy_pbr v0.6.0
              │           │   │   │   │   ├── bevy_gltf v0.6.0
              │           │   │   │   │   │   └── bevy_internal v0.6.0 (*)
              │           │   │   │   │   └── bevy_internal v0.6.0 (*)
              │           │   │   │   ├── bevy_sprite v0.6.0
              │           │   │   │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   │   │   ├── bevy_text v0.6.0
              │           │   │   │   │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   │   │   │   └── bevy_ui v0.6.0
              │           │   │   │   │   │       └── bevy_internal v0.6.0 (*)
              │           │   │   │   │   └── bevy_ui v0.6.0 (*)
              │           │   │   │   └── bevy_ui v0.6.0 (*)
              │           │   │   ├── bevy_gltf v0.6.0 (*)
              │           │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_pbr v0.6.0 (*)
              │           │   │   ├── bevy_render v0.6.0
              │           │   │   │   ├── bevy_core_pipeline v0.6.0 (*)
              │           │   │   │   ├── bevy_gltf v0.6.0 (*)
              │           │   │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   │   ├── bevy_pbr v0.6.0 (*)
              │           │   │   │   ├── bevy_sprite v0.6.0 (*)
              │           │   │   │   ├── bevy_text v0.6.0 (*)
              │           │   │   │   └── bevy_ui v0.6.0 (*)
              │           │   │   ├── bevy_scene v0.6.0
              │           │   │   │   ├── bevy_gltf v0.6.0 (*)
              │           │   │   │   └── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_sprite v0.6.0 (*)
              │           │   │   ├── bevy_text v0.6.0 (*)
              │           │   │   └── bevy_ui v0.6.0 (*)
              │           │   ├── bevy_audio v0.6.0 (*)
              │           │   ├── bevy_core v0.6.0
              │           │   │   ├── (dev) bevy_asset v0.6.0 (*)
              │           │   │   ├── bevy_core_pipeline v0.6.0 (*)
              │           │   │   ├── bevy_gltf v0.6.0 (*)
              │           │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_pbr v0.6.0 (*)
              │           │   │   ├── bevy_render v0.6.0 (*)
              │           │   │   ├── bevy_sprite v0.6.0 (*)
              │           │   │   ├── bevy_text v0.6.0 (*)
              │           │   │   └── bevy_ui v0.6.0 (*)
              │           │   ├── bevy_core_pipeline v0.6.0 (*)
              │           │   ├── bevy_diagnostic v0.6.0
              │           │   │   ├── bevy_asset v0.6.0 (*)
              │           │   │   └── bevy_internal v0.6.0 (*)
              │           │   ├── bevy_gilrs v0.6.0
              │           │   │   └── bevy_internal v0.6.0 (*)
              │           │   ├── bevy_gltf v0.6.0 (*)
              │           │   ├── bevy_input v0.6.0
              │           │   │   ├── bevy_gilrs v0.6.0 (*)
              │           │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_ui v0.6.0 (*)
              │           │   │   └── bevy_winit v0.6.0 (*)
              │           │   ├── bevy_internal v0.6.0 (*)
              │           │   ├── bevy_log v0.6.0 (*)
              │           │   ├── bevy_pbr v0.6.0 (*)
              │           │   ├── bevy_render v0.6.0 (*)
              │           │   ├── bevy_scene v0.6.0 (*)
              │           │   ├── bevy_sprite v0.6.0 (*)
              │           │   ├── bevy_text v0.6.0 (*)
              │           │   ├── bevy_time v0.6.0
              │           │   │   ├── bevy_diagnostic v0.6.0 (*)
              │           │   │   └── bevy_internal v0.6.0 (*)
              │           │   ├── bevy_transform v0.6.0
              │           │   │   ├── bevy_gltf v0.6.0 (*)
              │           │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_pbr v0.6.0 (*)
              │           │   │   ├── bevy_render v0.6.0 (*)
              │           │   │   ├── bevy_scene v0.6.0 (*)
              │           │   │   ├── bevy_sprite v0.6.0 (*)
              │           │   │   ├── bevy_text v0.6.0 (*)
              │           │   │   └── bevy_ui v0.6.0 (*)
              │           │   ├── bevy_ui v0.6.0 (*)
              │           │   ├── bevy_window v0.6.0
              │           │   │   ├── bevy_internal v0.6.0 (*)
              │           │   │   ├── bevy_pbr v0.6.0 (*)
              │           │   │   ├── bevy_render v0.6.0 (*)
              │           │   │   ├── bevy_text v0.6.0 (*)
              │           │   │   ├── bevy_ui v0.6.0 (*)
              │           │   │   └── bevy_winit v0.6.0 (*)
              │           │   └── bevy_winit v0.6.0 (*)
              │           ├── bevy_asset v0.6.0 (*)
              │           ├── bevy_diagnostic v0.6.0 (*)
              │           ├── bevy_gltf v0.6.0 (*)
              │           ├── bevy_internal v0.6.0 (*)
              │           ├── bevy_sprite v0.6.0 (*)
              │           └── bevy_ui v0.6.0 (*)
              └── bevy_winit v0.6.0 (*)

@alice-i-cecile
Copy link
Member

Only CI error seems unrelated

Yep, not your fault.

@alice-i-cecile
Copy link
Member

bors try

@bors
Copy link
Contributor

bors bot commented Mar 12, 2022

try

Merge conflict.

@CAD97
Copy link
Contributor Author

CAD97 commented Mar 12, 2022

Rebased.

This will almost certainly fail but might as well try:

bors try=@alice-i-cecile

@bors
Copy link
Contributor

bors bot commented Mar 12, 2022

🔒 Permission denied

Existing reviewers: click here to make CAD97 a reviewer

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

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

not sure I agree this is needed, but it's well done

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 13, 2022
@alice-i-cecile
Copy link
Member

bors try

@bors
Copy link
Contributor

bors bot commented Apr 22, 2022

try

Merge conflict.

@alice-i-cecile
Copy link
Member

@CAD97 can you rebase? I'd like to get this in, in order to make future PRs easier.

@alice-i-cecile alice-i-cecile added the X-Controversial There is active debate or serious implications around merging this PR label Apr 23, 2022
@CAD97
Copy link
Contributor Author

CAD97 commented Apr 23, 2022

(gah, I missed an unused dep in the rebase. I'll get to it tomorrow when I'm back at desktop.)

@CAD97
Copy link
Contributor Author

CAD97 commented Apr 24, 2022

Fixed the udep.

@CAD97 CAD97 force-pushed the bevy_time branch 2 times, most recently from 6faf3e8 to e458e96 Compare April 26, 2022 07:56
@CAD97
Copy link
Contributor Author

CAD97 commented Apr 26, 2022

Rebased for #4469 and removed an accidental unused bevy_time/src/mod.rs that appeared in a previous rebase.

@CAD97
Copy link
Contributor Author

CAD97 commented Apr 26, 2022

(Meta note: without a ping when a merge conflict arises, which GitHub does not provide by default, noticing that there's a merge conflict in order to rebase relies on the PR author happening to revisit the PR to see the notice, or a reviewer giving the ping.)

@CAD97
Copy link
Contributor Author

CAD97 commented May 25, 2022

"dead link" on this rebase was a 503 response from https://opensource.org/licenses/MIT

@james7132
Copy link
Member

bors try

bors bot added a commit that referenced this pull request May 25, 2022
Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

Just added bevy_time to the publish script. I think this is good to go.

@cart
Copy link
Member

cart commented May 26, 2022

bors r+

bors bot pushed a commit that referenced this pull request May 26, 2022
# Objective

Reduce the catch-all grab-bag of functionality in bevy_core by minimally splitting off time functionality into bevy_time. Functionality like that provided by #3002 would increase the complexity of bevy_time, so this is a good candidate for pulling into its own unit.

A step in addressing #2931 and splitting bevy_core into more specific locations.

## Solution

Pull the time module of bevy_core into a new crate, bevy_time.

# Migration guide

- Time related types (e.g. `Time`, `Timer`, `Stopwatch`, `FixedTimestep`, etc.) should be imported from `bevy::time::*` rather than `bevy::core::*`.
- If you were adding `CorePlugin` manually, you'll also want to add `TimePlugin` from `bevy::time`.
- The `bevy::core::CorePlugin::Time` system label is replaced with `bevy::time::TimeSystem`.

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
@bors bors bot changed the title Split time functionality into bevy_time [Merged by Bors] - Split time functionality into bevy_time May 26, 2022
@bors bors bot closed this May 26, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Jun 7, 2022
# Objective

Reduce the catch-all grab-bag of functionality in bevy_core by minimally splitting off time functionality into bevy_time. Functionality like that provided by bevyengine#3002 would increase the complexity of bevy_time, so this is a good candidate for pulling into its own unit.

A step in addressing bevyengine#2931 and splitting bevy_core into more specific locations.

## Solution

Pull the time module of bevy_core into a new crate, bevy_time.

# Migration guide

- Time related types (e.g. `Time`, `Timer`, `Stopwatch`, `FixedTimestep`, etc.) should be imported from `bevy::time::*` rather than `bevy::core::*`.
- If you were adding `CorePlugin` manually, you'll also want to add `TimePlugin` from `bevy::time`.
- The `bevy::core::CorePlugin::Time` system label is replaced with `bevy::time::TimeSystem`.

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
@CAD97 CAD97 deleted the bevy_time branch November 16, 2022 00:54
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Reduce the catch-all grab-bag of functionality in bevy_core by minimally splitting off time functionality into bevy_time. Functionality like that provided by bevyengine#3002 would increase the complexity of bevy_time, so this is a good candidate for pulling into its own unit.

A step in addressing bevyengine#2931 and splitting bevy_core into more specific locations.

## Solution

Pull the time module of bevy_core into a new crate, bevy_time.

# Migration guide

- Time related types (e.g. `Time`, `Timer`, `Stopwatch`, `FixedTimestep`, etc.) should be imported from `bevy::time::*` rather than `bevy::core::*`.
- If you were adding `CorePlugin` manually, you'll also want to add `TimePlugin` from `bevy::time`.
- The `bevy::core::CorePlugin::Time` system label is replaced with `bevy::time::TimeSystem`.

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Common functionality for all bevy apps 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 X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants