What problem does this solve or what need does it fill?
Internal components like Observer require an Internal component with a default query filter. Default query filters can be ignored by mentioning the type in the query, like With<Internal> or Allows<Internal>. But when the filter is added by a required component, the user may not know to mention it!
let mut world = World::new();
let entity = world.spawn(Observer::new(|_: On<Insert>| {})).id();
// This seems like it should work, but does not
let mut query = world.query::<&Observer>();
assert!(query.query(&world).get(entity).is_err());
// This is the workaround, but is hard to discover
let mut query = world.query_filtered::<&Observer, Allow<Internal>>();
assert!(query.query(&world).get(entity).is_ok());
What solution would you like?
When a query mentions a component that requires a component with a default query filter, that filter should be ignored.
What problem does this solve or what need does it fill?
Internal components like
Observerrequire anInternalcomponent with a default query filter. Default query filters can be ignored by mentioning the type in the query, likeWith<Internal>orAllows<Internal>. But when the filter is added by a required component, the user may not know to mention it!What solution would you like?
When a query mentions a component that requires a component with a default query filter, that filter should be ignored.