BreadBoard
BreadBoard copied to clipboard
Questions about depsolving, locks, parameters, singletons
Why can't we defer a parameterized service, if we have the parameters?
In ::WithDependencies::resolve_dependencies, could we not stash the $dependency->service_params alongside the $service object in the ::Deferred proxy? There's probably a good reason, but I don't see it…
Also, why is the is_locked attribute not marked NoClone?
I don't recall the reason why parameterized services cannot be deferred, which makes me think that it was some seriously tricky bits causing this. Perhaps @doy can comment better here.
As for the "Clone"/"NoClone" stuff, I really don't recall all the logic behind that, @jrockway added that it I believe, perhaps @nothingmuch, it was a long time ago, perhaps doing some commit diving would help figure it out.