Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken assertion in `RequiresResolutionChecker#visitUncachedDepen…
…dencies()` Within `visitUncachedDependencies()` we assert that each uncached key is actually uncached before caching it. However, this assertion can fail because during the process of caching, we call `getLocalExplicitBindings()` and `getLocalMultibindingContributions()` which can trigger its own call to `visitUncachedDependencies()` and cache it first. This CL fixes this issue by avoiding the calls to `getLocalExplicitBindings()` and `getLocalMultibindingContributions()`. In these cases we don't actually need the bindings themselves since we just need to know if the declarations exist or not, so we can just use the declarations directly. This saves us a bit of work because creating the binding requires us to not only resolve the binding itself, but also bindings for dependencies (possibly even transitive dependencies) in the case `@Binds` delegate declarations. It's also nice to keep the assertion because it gaurantees some simplicity to the code. RELNOTES=N/A PiperOrigin-RevId: 653633501
- Loading branch information