7mind / izumi

Productivity-oriented collection of lightweight fancy stuff for Scala toolchain

Home Page:https://izumi.7mind.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better local context management API

pshirshov opened this issue · comments

local.named("context1").from(defs: ModuleDef)

(local: LocalContext) =>

val producer: Producer = local.provide(DIKey.get[Import] -> value, ...)
producer.run / producer.produceFX / ....

The plan produced by the binding must be done in a context inherited from the outer injector.

commented

Would probably need to declare 'context' components for the compile checker:

  declareHole[Ctx[F]]