-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Better error messages for IntoSystem and IntoExclusive System #1519
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-BlockedThis cannot move forward until something else changesThis cannot move forward until something else changes
Description
What problem does this solve or what need does it fill?
The current error messages for when system parameters is wrong is very opaque. As an example:
no method named `system` found for fn item `for<'r, 's, 't0, 't1> fn(Query<'r, (bevy::prelude::Entity, &'s AttackBonus, &'t0 Defense, &'t1 Advantage), bevy::prelude::With<(Active, Attack)>>, Commands) {check_attacks}` in the current scope
`check_attacks` is a function, perhaps you wish to call it
This is particularly painful because these mistakes are a common beginner issue and there's no clear path forward.
What solution would you like?
The compiler examines each of your system's parameters, explains which one fails, and ideally makes a simple suggestion on how to correct it.
What alternative(s) have you considered?
None.
Additional context
The relevant macros would be cleaned up substantially if variadic generics ever lands.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-BlockedThis cannot move forward until something else changesThis cannot move forward until something else changes