Skip to content

Simple improvements to ambiguity reporting clarity #1484

@alice-i-cecile

Description

@alice-i-cecile

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

Ambiguity reports are hard to decipher.

What solution would you like?

  1. Number the reported ambiguities, to make them easier to discuss in a team.
  2. Display function signatures of conflicting systems.
  3. Explain which component(s) / resource(s) the systems are conflicting on.
  4. Report ambiguities where all pairwise combinations of systems conflict on the same data as a group.
  5. Create a simple .ambiguous() method that causes a system to be ignored completely in the ambiguity checker. This would only be useful for inconsequential systems like particle effect creation.
  6. Create a simple .ambiguous_with(system_label) method to create two-element ambiguity sets without being forced to invent an ambiguity set label.
  7. Provide an "X unresolved ambiguities detected" message that runs by default. Rather than toggling ambiguity detection on/off, have three states: off / minimal / verbose. This would provide discoverability that system ambiguities are a thing and let developers see when the change that they just made added / removed some ambiguities at a glance.

What alternative(s) have you considered?

Allow for a verbose mode?

Additional context

Many more complex improvements could be added, but these are deliberately simple to allow them to be patched and merged quickly. This arose from helping @jamadazi with resolving ambiguities in his non-trivial codebase.

Suggestion 6 results in asymmetric declarations of a symmetric property, but having to invent trivial names all over the place is awful, and large ambiguity sets are often overkill / have unintended behavior for simple conflict resolutions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions