Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.11.4→0.12.00.11.4→0.12.00.11.4→0.12.0Release Notes
ZacSweers/metro (dev.zacsweers.metro)
v0.12.0Compare Source
2026-03-24
New
[MEEP-2014] Implicit class (map) keys
MapKey.implicitClassKeyis a new API to allow for class-based map keys to have their class parameters inferred on classes and@Bindsdeclarations.This means that instead of redeclaring the annotated class in the key, for example
@ViewModelKey, you can now omit it and it will be inferred.For classes, the implicit type is the annotated class. For
@Bindsdeclarations, the receiver or single parameter are the implicit type.You may still specify an explicit type. The compiler will warn you if you specify a redundant one. If you need to suppress this diagnostic temporarily to ease migration, you can add
-Xwarning-level=MAP_KEY_REDUNDANT_IMPLICIT_CLASS_KEY:disabledto your compiler arguments.The compiler will also error if you attempt to do this on
@Providesdeclarations, as those cannot be inferred.Metro's first-party class-based map keys (like
@ClassKey,@ViewModelKey, etc.) now support this. Custom map keys can opt-in to this by settingMapKey.implicitClassKeyto true. See its doc for more details.Misc
mingwX64target.Enhancements
FUNCTIONtargets if they have a@Targetannotation.Fixes
IllegalArgumentExceptionthrown when there are multiple top-level functions with the same name but only one is annotated with@Inject.SuspiciousUnusedMultibindinglocations.@OptionalBindingannotations to generated static factory creators if present.IntoSetandIntoMapno longer have aTargetofAnnotationTarget.CLASSChanges
2.2.@Assisted.valueis formally deprecated now. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.2.3.20but still targets Kotlin 2.2 for its runtime artifacts and supports 2.2.20 all to 2.4.0 dev builds in its compiler.macosX64,tvosX64, andwatchosX64targets.2.4.0-dev-539to2.4.0-dev-2124. This should support the upcoming IntelliJ 2026.1 release as well as the upcoming Kotlin2.4.0-Beta1.2026.1 RC.6.1.0.Contributors
Special thanks to the following contributors for contributing to this release!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.