dave08
04/22/2018, 5:17 PMKodein.Module
access the bindings in another imported module, or only the importing Kodein
has access to all the module's bindings? If the latter then a module will have to be a fun
that accepts all dependencies needed from other modules, or does it also have to import the module to use it...?salomonbrys
04/22/2018, 8:38 PMextend
works differently than import
).dave08
04/23/2018, 10:11 AMextend
, whereas to create re-usable modules, it's import
.
Although, I think it would have been nice to have some kind of bindInternal
or bind(internal=true)
to avoid pollution of the global dependency map in the Kodein
instance, some deps are only needed in their respective module...dave08
04/24/2018, 12:05 PMsalomonbrys
04/24/2018, 12:08 PMextend(parent, copy = Copy.None)
. I understand the need for bindInternal
but it is not possible in the current modeling. Module instances have no state (Kodein instances do). A Kodein.Module
is a glorified function that will declare its bindings to each importing Kodein builder, the binding tree is associated to a Kodein instance, not a Module.dave08
04/24/2018, 12:11 PMsalomonbrys
04/24/2018, 12:13 PMdave08
04/24/2018, 5:16 PM