Open rubybrowncoat opened 2 weeks ago
If I'm reading the changes correctly, this makes the decorators deduplicate component and system types by name. This is dangerous: if you accidentally have two different types with the same name (an easy mistake to make in a large project!), Becsy will silently drop one of them.
I believe the right way to handle the issue is to get a notification when a module is being unloaded and pull all the types it defines out of the arrays at that time.
I'm opening this so we may discuss the approach to see if fits and holds up,
The repro repository for the hot-reloading issue is still at https://github.com/rubybrowncoat/becsy-hot-reloading but I pointed the
@lastolivegames/becsy
package to a local clone of the fork at https://github.com/rubybrowncoat/becsy that has been built with the changes.This change is