Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions dev-guide/compiler-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,23 @@ especially true when dealing with Kotlin sources, where wildcards must be
interpreted indirectly from a number of factors other than the explicit variance
at the use site.

## Detect duplicate map multibinding contributions across component boundaries {#map-multibinding-duplicate-detection-fix}

The `dagger.mapMultibindingDuplicateDetectionFix` flag fixes a bug in Dagger
where duplicate multibinding map keys were allowed in certain situations.
When the flag is enabled Dagger should enforce strict duplicate checking of map
multibinding contributions (e.g., identical `@IntoMap` bindings) across
component boundaries.

By default, this flag is disabled, meaning Dagger preserves the legacy lenient
behavior and ignores duplicate map key contributions across component
boundaries.

To opt-in to strict duplicate detection at compile time (for Maps), enable the
flag by passing the following compiler option:

`-Adagger.mapMultibindingDuplicateDetectionFix=ENABLED`

<!-- References -->

[`@Component`]: https://dagger.dev/api/latest/dagger/Component.html
Expand Down
Loading