Skip to content

Remove the need to derive Event when deriving EntityEvent #20104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tim-blackbird
Copy link
Contributor

@tim-blackbird tim-blackbird commented Jul 12, 2025

Objective

Since we are planning to remove the need to derive both Event and EntityEvent in 0.17 either way, I'm choosing to do the easy thing in this PR so we can get the churn out of the way early.

Context from discord. Related to, and will conflict slightly with #20101.

Solution

  • Derive Event as part of the EntityEvent derive
  • Remove any Event derives that were made unnecessary
  • Update release notes

@tim-blackbird tim-blackbird added A-ECS Entities, components, systems, and events X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 12, 2025
@tim-blackbird tim-blackbird added this to the 0.17 milestone Jul 12, 2025
Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small thing I noticed!

@@ -60,13 +60,13 @@ impl Mine {
}
}

#[derive(Event, EntityEvent)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking: was EntityEvent purposefully removed here, or was this a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On purpose :) ExplodeMines is only used without an entity target. I presume EntityEvent was derived by accident before

@tim-blackbird tim-blackbird added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 13, 2025
@alice-i-cecile
Copy link
Member

I still think that an associated type or const or something on a single trait is going to be better here in the end, but this will make that migration easier regardless and it's a nicer state for now.

@alice-i-cecile
Copy link
Member

@tim-blackbird ping me when the merge conflicts I'm about to generate are resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants