Skip to content

Deprecate App::add_system in favor of allowing single systems to be passed into add_systems #7992

Closed

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

There are several problems here:

  1. It's easy to typo add_system as add_systems and vice versa.
  2. The APIs are duplicative and somewhat confusing.
  3. The APIs are annoying to refactor between.
  4. Working with the complex mess of traits is a pain when writing app extension methods and internally.

What solution would you like?

  1. Use the same trick as in [Merged by Bors] - Implement Bundle for Component. Use Bundle tuples for insertion #2975 and impl the relevant trait for single systems.
  2. Deprecate App::add_system.
  3. Remove all of the single system traits if possible.

This must have a deprecation notice to reduce the migration pain.

Additional context

Discussed on Discord with @cart.

We could do the same thing for plugins later. See #7631 for a parallel problem there.

Activity

  1. added
    A-ECSEntities, components, systems, and events
    C-UsabilityA targeted quality-of-life change that makes Bevy easier to use
    X-Needs-SMEThis type of work requires an SME to approve it.
    on Mar 9, 2023
  2. added this to the 0.11 milestone on Mar 9, 2023
  3. hymm commented on Apr 16, 2023

    @hymm
    Contributor

    Should this be closed? add_system was deprecated in #8079.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useX-Needs-SMEThis type of work requires an SME to approve it.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions