forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
BindingGraphFactory
to remove the need for `keysMatchingRe…
…quest` and corresponding cache. This CL refactors `BindingGraphFactory` so that we no longer need to loop through all variations of a multibindings key when getting the `@Multibindings` declarations or `@IntoMap`/`@IntoSet` contributions from `ComponentDeclarations`. Instead, `ComponentDeclarations` now indexes these declarations by the unwrapped multibinding key (i.e. `Map<K, V>` or `Set<V>`) which we can use to get all declarations with a single key. In addition, the unwrapping of the key is done within `ComponentDeclarations` so that each caller doesn't have to remember to unwrap the key. RELNOTES=Fixes missing variance in KSP for multibindings which can break KSP users who forgot the `@JvmSuppressWildcards`. PiperOrigin-RevId: 660963882
- Loading branch information
Showing
5 changed files
with
342 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.