DestinationSol icon indicating copy to clipboard operation
DestinationSol copied to clipboard

Follow-ups for Gestalt-DI

Open BenjaminAmos opened this issue 3 years ago • 1 comments

Some things that could be improved on after merging #622:

  • [ ] All remaining uses of ContextWrapper should be removed
  • [ ] Make @Inject in NUI screens use the game context. This could be quite a bit of work.
  • [ ] Document the roles of the service registry classes (CoreService, GameConfigurationService, SolGameServiceRegistry etc.)
  • [ ] Try to find a better alternative to EventReceiverServiceRegistry. It uses the older getSubtypesOf method, which might be better replaced with newer automatic techniques now provided by gestalt-di.
  • [ ] If ModuleManager initialisation fails, try to find a way of exiting gracefully whilst displaying an error.

BenjaminAmos avatar May 26 '22 21:05 BenjaminAmos

Try to find a better alternative to EventReceiverServiceRegistry. It uses the older getSubtypesOf method, which might be better replaced with newer automatic techniques now provided by gestalt-di.

It uses new getSubtypesOf :3 I change behaviour of similar methods from scanning or using reflections cache to use gestalt-di indexing(@Index annotation)

But yeah. I imagine that target usage should be something like injecting some collection with event handlers... But gestalt-di don't generate this code yet. Another throuble - backward injecting(injecting from child beancontexts) is not tested yet.. potentially even work.

DarkWeird avatar May 27 '22 05:05 DarkWeird