Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move unwrapping of delegate keys to a single location. #4465

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

Move unwrapping of delegate keys to a single location.

This CL moves the unwrapping of the key directly into ComponentDeclarations#delegates(Key) instead of requiring all callers to remember to unwrap the key individually. This change will make this API less error-prone, as it's already caused one bug (b/147020838).

Note: In order to make this change, I needed to refactor how we handled the strictMultibindingValidation flag. Rather than having the flag control whether or not we unwrap the key, the flag now just exits early from resolverContainsDelegateDeclarationForBinding, which should be functionally equivalent to how it works today. In particular, the delegate map multibindings are always wrapped today, so not unwrapping the key will always result in a miss when looking up the key in the map.
RELNOTES=N/A

@copybara-service copybara-service bot closed this Oct 2, 2024
@copybara-service copybara-service bot deleted the test_680602172 branch October 2, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants