Offer schedule configs that are both `weak` and `ignore_deferred`
What problem does this solve or what need does it fill?
#25128 added weak ordering. I want to add support for my reversible crate which, in a nutshell, offers a way to run schedules in reverse.
So far my non-weak reversible configs that add sync points still use bevy's ignore_deferred for... reasons.
Weak variants of these would need to add the weak characteristic to these ignore_deferred methods.
What solution would you like?
New methods:
after_ignore_deferred_weakbefore_ignore_deferred_weakchain_ignore_deferred_weak
Weak ordering orders systems if the first system(s) have conflicting access (sys_a queues &mut Foo, next sys_b queues &Foo) or queue commands.
Combining it with ignore_deferred would mean that only conflicting access would bring the ordering into consideration and sync points in between would not be added by this config, regardless if first systems have commands.
What alternative(s) have you considered?
In my linked comment I mentioned I could just not offer that optimization:
So for now I have to decide what to pick here:
- stick to after_ignore_deferred, always make it ordered, no optimization for when this could drop the ordering
- use after_weak, enabling the weak optimization when applicable, but adding a needless sync point when not
I expect to do one of these in the meantime, linking to this issue here.
I also tried to just copy what for example before_weak_inner does but unlike the type IgnoreDeferred, the type Weak is not public. I also doubt combining both has the effect I desire here, Weak would likely still evaluate commands in its logic.
Source: bevyengine/bevy