-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
System param validation error message for Option<Single<&Thing>>
when there are two Thing
s is confusing
#17740
Comments
Single you can't use Single with 2 or more items |
does this satisfy what you need to do? |
My complaint is about the error message. It seems to be saying that there are zero things when the problem is in fact that there are multiple things. |
Option works fine. there is a Single. the Single itself can't handle it's data. I agree that the error message doesn't help. should say something like "Panic! Single has invalid data" |
Totally agree with OP here,
This needs to be fixed asap. |
I don't actually agree with that. I think it's fine for it to fail, but the error message should say that it's failing because there was more than one result to the query. |
Let me clarify: When a user writes That it fails at runtime is not great, but it's the documented behaviour of a However, I think the panic message should be improved so that it says what the problem actually is. |
Bevy version
0.15.2
What you did
The system param validation error message for
Option<Single<&Thing>>
when there are twoThing
s is confusing.Running this gives the following error message:
single_option_debug::update could not access system parameter Option<Single<Thing>>
.This confused me for a while because it seems to say that the
Option<Single<&Thing>>
isn't present, but the whole point of the option is for the system to work even if theThing
isn't there. I know it's obvious what's going on in this small example, but I encountered it in a bigger program where it was harder to figure out.Full stdout:
The text was updated successfully, but these errors were encountered: