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

SystemSet does not take SystemTypeIdLabel like ParallelSystemDescriptor #4554

Closed
CGMossa opened this issue Apr 21, 2022 · 0 comments
Closed
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps

Comments

@CGMossa
Copy link
Contributor

CGMossa commented Apr 21, 2022

Mixing labels with SystemSet does not work, but it does for Systems. I've been told it is because the changes
to ParallelSystemDescriptor wasn't applied to SystemSet.

Example

use bevy_app::prelude::*;
use bevy_ecs::prelude::*;

#[allow(dead_code)]
fn some_system() {}

#[allow(dead_code)]
fn another_system() {}

#[allow(dead_code)]
fn dummy_system() {}

fn main() {
    let mut app = App::new();

    app.add_system(dummy_system.label("dummy system"));
    app.add_system(another_system);
    // fails to compile:
    app.add_system_set(
        SystemSet::new()
            .with_system(some_system)
            .after(another_system)
            .after("dummy system"),
    );

    app.run();
}
error[E0277]: the trait bound `fn() {another_system}: SystemLabel` is not satisfied
   --> examples\system_labels_and_custom_labels.rs:22:16
    |
22  |         .after(another_system)
    |          ----- ^^^^^^^^^^^^^^ the trait `SystemLabel` is not implemented for `fn() {another_system}`
    |          |
    |          required by a bound introduced by this call
    |
note: required by a bound in `bevy_ecs::schedule::SystemSet::after`
   --> C:\Users\Tyler\.cargo\git\checkouts\bevy-f7ffde730c324c74\26c3b20\crates\bevy_ecs\src\schedule\system_set.rs:104:40
    |
104 |     pub fn after(mut self, label: impl SystemLabel) -> Self {
    |                                        ^^^^^^^^^^^ required by this bound in `bevy_ecs::schedule::SystemSet::after`

Discussion on discord

@CGMossa CGMossa added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 21, 2022
@aevyrie aevyrie added A-ECS Entities, components, systems, and events P-Compile-Failure A failure to compile Bevy apps and removed S-Needs-Triage This issue needs to be labelled labels Apr 22, 2022
@CGMossa CGMossa closed this as completed Apr 23, 2022
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-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps
Projects
None yet
Development

No branches or pull requests

2 participants