pulp icon indicating copy to clipboard operation
pulp copied to clipboard

Investigate if we handle MacWire's use cases or integrate with it

Open MateuszKubuszok opened this issue 6 years ago • 3 comments

MateuszKubuszok avatar Mar 08 '18 11:03 MateuszKubuszok

We surely do not handle the case where arguments pass from the constructor:

class C(b: B)

class A(b: B) {

  val c1: C = wire[C] // MacWire handles it
  val c2: C = Provider.get[C] // would fail
}

MateuszKubuszok avatar Mar 23 '18 09:03 MateuszKubuszok

Possibility 1: a method annotation, that creates implicit Provider for each argument (problem - what if Provider would not be used?)

MateuszKubuszok avatar Mar 23 '18 09:03 MateuszKubuszok

Possibility 2: somehow extend MacWire with values from implicit Providers (is it even possible?)

MateuszKubuszok avatar Mar 23 '18 09:03 MateuszKubuszok