#"<System> wants to be after unknown label" Error

20 messages · Page 1 of 1 (latest)

weary crag
#

I'm ramping back up on an old library I was working on previously and I'm currently getting these errors when running one of my examples

I have the system labels mentioned defined like so : ```rust
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, SystemLabel)]
pub enum OkizemeSystemLabels {
InputPhase,
ActionPhase,
CollisionPhase,
PhysicsPhase,
ResultPhase,
CleanupPhase,
}

#

and the systems are being added here:

        use OkizemeSystemLabels::*;

        // Systems
        app.add_stage(
            "main",
            SystemStage::single_threaded()
                // Ensure that everything runs at 60 frames per second
                .with_run_criteria(FixedTimestep::steps_per_second(60.))
                // Input Phase
                .with_system_set(
                    SystemSet::on_update(OkizemeStates::Gameplay)
                        .label(InputPhase)
                        .with_system(write_inputs_to_buffer)
                        .with_system(read_inputs.after(write_inputs_to_buffer)),
                )
                // Action Phase
                .with_system_set(
                    SystemSet::on_update(OkizemeStates::Gameplay)
                        .label(ActionPhase)
                        .after(InputPhase)
                        .with_system(manage_action_state)
                        .with_system(add_busy.after(manage_action_state))
                        .with_system(handle_attacks),
                )
                // Collision Phase
                .with_system_set(
                    SystemSet::on_update(OkizemeStates::Gameplay)
                        .label(CollisionPhase)
                        .after(ActionPhase)
 ...                       
        );

#

So I suppose I'm wondering if my SystemLabels are defined wrong, or if there is an interaction between system stages/sets that I'm missing

pine valve
#

System labels don't currently work between stages 😢

weary crag
#

ahhh that would explain it, so would I just need to do explicit ordering in this case for the time being?

pine valve
#

Systems fundamentally cannot see systems in other stages in any way

#

Although, hmm

#

That may not be the problem here? It's unclear if you're doing cross-stage ordering

#

Anyways, the solution for now is to rely on the ordering guaranteed by stages. All systems in an earlier stage must complete before the next stage can begin

weary crag
#

It's actually different system sets within the same stage, if that changes anything

pine valve
#

Hmm yeah it does

#

Probably a different cursed bug

#

There's like two dozen of them

#

I ran into similar looking problems with iyes_loopless states and ordering

weary crag
#

dang, I'll poke around a bit, but worst case scenario I can just order each system explicitly and then wait for the merge

#

thanks for the help! also awesome job with leafwing input manager, I integrated that today and it's a real lifesaver

pine valve
#

I'm really glad it's so helpful ❤️

#

Stageless should be landing soon, fingers crossed