simple-stack icon indicating copy to clipboard operation
simple-stack copied to clipboard

Verify that the new `setParentServices()`'s `lookupFromScope(..., EXPLICIT)` behavior is what is expected

Open Zhuinden opened this issue 2 years ago • 0 comments

Currently, all service lookup done to the parent services (added in https://github.com/Zhuinden/simple-stack/commit/9019ceab30c0cb088d2114bfc2bbb7db0d5f476a ) is done with ALL, even if you passed EXPLICIT.

On one hand, passing EXPLICIT up would make sense, as that's what you received.

On the other hand, knowing that you can't pass up ALL would mean your child stack knows a bit too much about what scopes are available in the parent, whom you should be treating as a black box.

I can technically argue for both sides, so I made it unified and it just does a "lookup from provided scope", where the default has always been ALL.

Zhuinden avatar Jul 03 '23 14:07 Zhuinden