Stray
Stray
Sorry guys, I missed this. "I forgot to map this" is a mistake I make frequently. In RL1 that's cool, the injector has my back. But Silent Fails are a...
Can you clarify why you decide to do away with `instantiate` and only have `getInstance`? Thx. I feel like constructor injection is orthogonal to mapping... and yet the current situation...
Extra thought: the current situation also locks me out of [PostConstruct]. (Unless InjectInto also runs PostConstruct methods? But that seems confusing...) At first I thought just an `instantiate()` method would...
Agreed... but I think we've already identified that it shouldn't? Because we need the errors (unless the user deliberately switches them off).
"As `getInstance` is only ever called by explicit decision of the API user, I don't think that's a similar situation to automatic, behind the scenes instantiation of unmapped dependencies." Except...
Ah... I may be being stupid, could one simply get a childInjector, make a new mapping and getInstance on that childInjector if you wanted a fresh instance?
Yes please! I actually think there are 4 distinct behaviours here and we're trying to cram them into one or two API functions. 1. Get me an instance, if there...
For clarity - I've gone for `createNewInstance` because `instantiateUnmapped` implies that the class being instantiated mustn't be mapped, where as `createNewInstance` doesn't. There may be a better fit.
4 would be the solution to the OP's problem - where he has a nested set of dependencies (think army of Robots each needs 2 legs, 2 arms, legs need...
Yes. History shows the discussion has rumbled on for 3 years - I'm guessing an afternoon isn't going to be sufficient :)