bevy_mod_debugdump icon indicating copy to clipboard operation
bevy_mod_debugdump copied to clipboard

Errors in examples for bevy 0.12.1

Open ChronosWS opened this issue 1 year ago • 0 comments

Cargo.toml:

bevy =  version = "0.12.1"
bevy_mod_debugdump = "0.9.0"

Code:

use bevy::prelude::*;

...
    let mut app = App::new();

    app.add_plugins(DefaultPlugins)
        .add_systems(Startup, systems::setup)
        .add_systems(
            Update,
            (bevy::window::close_on_esc, systems::rotate_in_place),
        );


        if opt.dump_schedule {
            bevy_mod_debugdump::print_schedule_graph(&mut app, Update);
        }

        if opt.dump_render {
            bevy_mod_debugdump::print_render_graph(&mut app);
        }

It seems like there are some type alias changes or something going on here that make the re-exports in prelude unusable.

Compilation errors:

error[E0277]: the trait bound `bevy::prelude::Update: bevy_ecs::schedule::set::ScheduleLabel` is not satisfied
  --> src/main.rs:45:64
   |
45 |             bevy_mod_debugdump::print_schedule_graph(&mut app, Update);
   |             ----------------------------------------           ^^^^^^ the trait `bevy_ecs::schedule::set::ScheduleLabel` is not implemented for `bevy::prelude::Update`
   |             |
   |             required by a bound introduced by this call
   |
   = help: the following other types implement trait `bevy_ecs::schedule::set::ScheduleLabel`:
             bevy_utils::intern::Interned<(dyn bevy_ecs::schedule::set::ScheduleLabel + 'static)>
             bevy_app::main_schedule::Main
             bevy_app::main_schedule::PreStartup
             bevy_app::main_schedule::Startup
             bevy_app::main_schedule::PostStartup
             bevy_app::main_schedule::First
             bevy_app::main_schedule::PreUpdate
             bevy_app::main_schedule::StateTransition
           and 13 others
note: required by a bound in `bevy_mod_debugdump::print_schedule_graph`
  --> /home/cliff/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.9.0/src/lib.rs:40:65
   |
40 | pub fn print_schedule_graph(app: &mut App, schedule_label: impl ScheduleLabel) {
   |                                                                 ^^^^^^^^^^^^^ required by this bound in `print_schedule_graph`

error[E0308]: mismatched types
  --> src/main.rs:45:54
   |
45 |             bevy_mod_debugdump::print_schedule_graph(&mut app, Update);
   |             ---------------------------------------- ^^^^^^^^ expected `bevy_app::app::App`, found `bevy::prelude::App`
   |             |
   |             arguments to this function are incorrect
   |
   = note: `bevy::prelude::App` and `bevy_app::app::App` have similar names, but are actually distinct types
note: `bevy::prelude::App` is defined in crate `bevy_app`
  --> /home/cliff/dev/github/bevy/crates/bevy_app/src/app.rs:63:1
   |
63 | pub struct App {
   | ^^^^^^^^^^^^^^
note: `bevy_app::app::App` is defined in crate `bevy_app`
  --> /home/cliff/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.12.1/src/app.rs:63:1
   |
63 | pub struct App {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `bevy_app` are being used?
note: function defined here
  --> /home/cliff/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.9.0/src/lib.rs:40:8
   |
40 | pub fn print_schedule_graph(app: &mut App, schedule_label: impl ScheduleLabel) {
   |        ^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> src/main.rs:49:52
   |
49 |             bevy_mod_debugdump::print_render_graph(&mut app);
   |             -------------------------------------- ^^^^^^^^ expected `bevy_app::app::App`, found `bevy::prelude::App`
   |             |
   |             arguments to this function are incorrect
   |
   = note: `bevy::prelude::App` and `bevy_app::app::App` have similar names, but are actually distinct types
note: `bevy::prelude::App` is defined in crate `bevy_app`
  --> /home/cliff/dev/github/bevy/crates/bevy_app/src/app.rs:63:1
   |
63 | pub struct App {
   | ^^^^^^^^^^^^^^
note: `bevy_app::app::App` is defined in crate `bevy_app`
  --> /home/cliff/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.12.1/src/app.rs:63:1
   |
63 | pub struct App {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `bevy_app` are being used?
note: function defined here
  --> /home/cliff/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.9.0/src/lib.rs:82:8
   |
82 | pub fn print_render_graph(app: &mut App) {
   |        ^^^^^^^^^^^^^^^^^^

ChronosWS avatar Jan 21 '24 22:01 ChronosWS