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()!
There are lots of ways to add a system to a schedule, but
camera_modification_in_fixed_updatedoesn't catch most of them. We currently do this:bevy_cli/bevy_lint/src/lints/nursery/camera_modification_in_fixed_update.rs
Lines 108 to 110 in 71a2ac4
But that only catches
App::add_systems(...). These are all the systems I could find that can potentially add a system toFixedUpdate:App|SubAppadd_systemsconfigure_setsget_schedule_mut->ScheduleSchedulesadd_systemsconfigure_setsentry->Scheduleget_mut->ScheduleSchedule(that's guaranteed to beFixedUpdate, returned from another method)add_systemsconfigure_setsgraph_mut(manually adding the system node to the graph, too complicated to check IMO)Worldschedule_scopetry_schedule_scopeI 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 likeSubApp::add_systems()!