Skip to content

Eager system parameter validation causes issues with combinator and piped systems #18796

Open
@alice-i-cecile

Description

@alice-i-cecile

For some history, see #16638 (comment):

In a combination system, like a.and(b) or a.pipe(b) we're running param checks for all systems before running any of them. This results in resource_exists::<MyRes>.and(do_stuff) failing params, because do_stuff doesn't have MyRes even though it wouldn't run because of failed condition.
...
Since combination systems are incomplete, let's just ensure the first system (or the system, if no combinations are used) works correctly with fallible params, do not check params for subsequent ones and just let app crash like it did in 0.14. In 0.16 we can ship the correct param checking behavior, where we do it directly before running a system.

Originally posted by @chescock in #18755

The same problem occurs with combinator systems, particularly when using the short-circuiting and behavior. The same bug as in #18755 exists for combinator systems, but fixing it breaks much more normal use cases (and one of our doc tests!).

Proposed solution

In order to resolve this (and other issues, see #8857, #2381), we need to retain the unique identity of systems even when piped.

we can ship the correct param checking behavior, where we do it directly before running a system.

This is the ideal solution, but can't work with the current architecture. These systems, from the perspective of the schedule (and thus the executor), are only one system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be mergedX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions