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
Hey, I'm currently evaluating using Needle in our app and it looks quite promising. It took me quite some time to figure out, why the generator generated nothing beyond my RootComponent, though.
Turns out, I was doing: var foo: FooComponent { .init(parent: self) } and the generator does not recognize the dependency between RootComponent and FooComponent that way. var foo: FooComponent { FooComponent(parent: self) } works as expected.
Maybe not the most important thing, as one should be using protocols for most things anyway and you can't make that mistake, when your return type is a protocol... But would it be possible to support that, just to eliminate the possibility of human error here?
The text was updated successfully, but these errors were encountered:
Hey, I'm currently evaluating using Needle in our app and it looks quite promising. It took me quite some time to figure out, why the generator generated nothing beyond my
RootComponent
, though.Turns out, I was doing:
var foo: FooComponent { .init(parent: self) }
and the generator does not recognize the dependency betweenRootComponent
andFooComponent
that way.var foo: FooComponent { FooComponent(parent: self) }
works as expected.Maybe not the most important thing, as one should be using protocols for most things anyway and you can't make that mistake, when your return type is a protocol... But would it be possible to support that, just to eliminate the possibility of human error here?
The text was updated successfully, but these errors were encountered: