Apparently this wasn't tested as much as I probably should have... as I thought that canFindService/lookupService skips the services added in the ServiceBinder, and only searches in the parent scopes.
The scope that is being built is already an "active scope", and returns the service!
I'm actually not sure which variant makes more sense. To be fair, I also thought that it might be tricky that get finds something and lookup does not, so maybe I just got lucky (and this is a problem that is coincidentally already solved). 🤔
Apparently this wasn't tested as much as I probably should have... as I thought that
canFindService
/lookupService
skips the services added in the ServiceBinder, and only searches in the parent scopes.However, apparently because of https://github.com/Zhuinden/simple-stack/blob/a6070d99695b2881d32eefb72e75467a41538fc7/simple-stack/src/main/java/com/zhuinden/simplestack/ScopeManager.java#L114
The scope that is being built is already an "active scope", and returns the service!
I'm actually not sure which variant makes more sense. To be fair, I also thought that it might be tricky that
get
finds something andlookup
does not, so maybe I just got lucky (and this is a problem that is coincidentally already solved). 🤔