rj00a / evenio

An event-driven Entity Component System
MIT License
137 stars 14 forks source link

Redesign `ComponentAccessExpr`, improve error diagnostics #35

Closed rj00a closed 7 months ago

rj00a commented 7 months ago

This PR redesigns the ComponentAccessExpr type to track access conflicts more precisely. Queries such as Or<Or<(&mut A, With<&B>), (&A, Not<&B>)>, (&A, Not<&B>)> and (&mut A, &mut A, Not<&A>) will now pass the component access checker.

Additionally, we now defer access errors until after handler init has finished. This improves diagnostics by showing a list of all access conflicts together.

TODO

andrewgazelka commented 7 months ago

yay :)

andrewgazelka commented 7 months ago

I think there is a regression.

My code suddenly stops working (I can't see entities or anything on my server) when using 8ab990d9. It works perfectly fine on https://github.com/andrewgazelka/evenio/tree/fix-collisions-gt-2?branch=fix-collisions-gt-2

https://github.com/andrewgazelka/hyperion

rj00a commented 6 months ago

@andrewgazelka Should be fixed in https://github.com/rj00a/evenio/pull/37. Let me know if you run into anything else.

andrewgazelka commented 6 months ago

@andrewgazelka Should be fixed in #37. Let me know if you run into anything else.

Fixed for me :)