You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that I can remove redundant complexity of the context which is only used to do DI
Technical Notes
Currently there exist a BlockNodeContext object that is wired with the Dagger DI. The context has currently only a reference to the MetricsService and the Configuration class and is only used to do DI of the metrics service and the configuration.
The configuration for any given type is in some places still acquired via the Configuration object, which contradicts other usages, so it is a deprecated usage that should be removed.
The metrics service has no real reason to be injected via the context object.
This refactor will improve a lot of redundant and wrongful usages we currently have and clean up a lot the current DI wiring.
We need to:
drop the BlockNodeContext object
all places that require the metrics service should simply get it via DI
all places that require a specific type of configuration should get it via DI
if there are any Configuration specific types that are needed to be injected, but are not provided via Dagger, need to be now provided via Dagger
The text was updated successfully, but these errors were encountered:
Persona
As a Block Node Developer
Request
I want to drop the usage of the
BlockNodeContext
Goal
So that I can remove redundant complexity of the context which is only used to do DI
Technical Notes
Currently there exist a
BlockNodeContext
object that is wired with theDagger
DI. The context has currently only a reference to theMetricsService
and theConfiguration
class and is only used to do DI of the metrics service and the configuration.The configuration for any given type is in some places still acquired via the
Configuration
object, which contradicts other usages, so it is a deprecated usage that should be removed.The metrics service has no real reason to be injected via the context object.
This refactor will improve a lot of redundant and wrongful usages we currently have and clean up a lot the current DI wiring.
We need to:
BlockNodeContext
objectConfiguration
specific types that are needed to be injected, but are not provided viaDagger
, need to be now provided viaDagger
The text was updated successfully, but these errors were encountered: