Skip to content

camera_modification_in_fixed_update doesn't catch all ways to add systems to FixedUpdate #715

@BD103

Description

@BD103

There are lots of ways to add a system to a schedule, but camera_modification_in_fixed_update doesn't catch most of them. We currently do this:

// Match calls to `App::add_systems(schedule, systems)`
if !crate::paths::APP.matches_ty(cx, receiver_ty)
|| method_path.ident.name != sym::add_systems

But that only catches App::add_systems(...). These are all the systems I could find that can potentially add a system to FixedUpdate:

  • App | SubApp
    • add_systems
    • configure_sets
    • get_schedule_mut -> Schedule
  • Schedules
    • add_systems
    • configure_sets
    • entry -> Schedule
    • get_mut -> Schedule
  • Schedule (that's guaranteed to be FixedUpdate, returned from another method)
    • add_systems
    • configure_sets
    • graph_mut (manually adding the system node to the graph, too complicated to check IMO)
  • World
    • schedule_scope
    • try_schedule_scope

I don't think we need to check for all of these (some like Schedule::graph_mut() are particularly obtuse), but there is some low-hanging fruit like SubApp::add_systems()!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinterRelated to the linter and custom lintsC-BugA bug in the programD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixes

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions