Skip to content

Commit a8cdc73

Browse files
Update metro to v0.10.4 (#2299)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [dev.zacsweers.metro](https://redirect.github.com/ZacSweers/metro) | `0.10.3` → `0.10.4` | ![age](https://developer.mend.io/api/mc/badges/age/maven/dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin/0.10.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin/0.10.3/0.10.4?slim=true) | | [dev.zacsweers.metro:runtime](https://redirect.github.com/ZacSweers/metro) | `0.10.3` → `0.10.4` | ![age](https://developer.mend.io/api/mc/badges/age/maven/dev.zacsweers.metro:runtime/0.10.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/dev.zacsweers.metro:runtime/0.10.3/0.10.4?slim=true) | --- ### Release Notes <details> <summary>ZacSweers/metro (dev.zacsweers.metro)</summary> ### [`v0.10.4`](https://redirect.github.com/ZacSweers/metro/blob/HEAD/CHANGELOG.md#0104) [Compare Source](https://redirect.github.com/ZacSweers/metro/compare/0.10.3...0.10.4) *2026-02-13* ##### Enhancements - **\[FIR]**: Add suspicious scope diagnostics for cases where a developer might accidentally try to contribute to a concrete `@Scope` class or graph-like class, as that's not usually what you want! - **\[FIR]**: Add a diagnostic error for function member injection parameters with default values as they are not currently supported. - **\[IR]**: Extend conflicting overrides diagnostic in synthetic graphs (graph extension impls, dynamic graphs) to also validate compatible annotations. This catches scenarios where you may accidentally contribute something like a `fun dependency(): Dependency` accessor *and* `@Provides fun dependency(): Dependency` provider elsewhere, which previously resulted in undefined runtime behavior. - **\[IR]**: When reporting conflicting override types in synthetic graphs, underline the type and include the source location (when possible) to better indicate the issue. - **\[IR]**: Add a graph validation failure hint to report when a direct Map binding exists that cannot satisfy a Provider/Lazy map. - For example, the below snippet ```kotlin @&#8203;DependencyGraph interface ExampleGraph { val mapSize: Int @&#8203;Provides fun provideInt(map: Map<String, Provider<String>>): Int = map.size @&#8203;DependencyGraph.Factory interface Factory { fun create(@&#8203;Provides map: Map<String, String>): ExampleGraph } } ``` Now yields this error trace ``` error: [Metro/MissingBinding] Cannot find an @&#8203;Inject constructor or @&#8203;Provides-annotated function/property for: kotlin.collections.Map<kotlin.String, kotlin.String> kotlin.collections.Map<kotlin.String, kotlin.String> is injected at [ExampleGraph] ExampleGraph.provideInt(…, map) kotlin.Int is requested at [ExampleGraph] ExampleGraph.mapSize (Hint) A directly-provided 'Map<String, String>' binding exists, but direct Map bindings cannot satisfy 'Map<String, Provider<String>>' requests. IncompatibleMapValueType.kt:15:16 @&#8203;Provides map: kotlin.collections.Map<kotlin.String, kotlin.String> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provider/Lazy-wrapped map values (e.g., Map<K, Provider<V>>) only work with a Map **multibinding** created with `@IntoMap` or `@Multibinds`. ``` ##### Fixes - **\[IR]**: Gracefully handle skipping code gen for absent member-injected properties/single-arg setters. - **\[IR]**: Decompose `Map` graph factory inputs correctly so they can properly satisfy map requests on the graph. - **\[IR]**: Validate directly-provided map inputs from map-requesting injection sites. - **\[IR/Native]**: Fix mirror parameter check for providers in `object` classes in non-jvm compilations. ##### Changes - Deprecate the `generateThrowsAnnotations` option and make it no-op. This was only in place when debugging a past kotlin/native issue. ##### Contributors Special thanks to the following contributors for contributing to this release! - [@&#8203;scana](https://redirect.github.com/scana) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/ZacSweers/CatchUp). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My44LjUiLCJ1cGRhdGVkSW5WZXIiOiI0My44LjUiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 638ecdf commit a8cdc73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ktfmt = "0.61"
3232
leakcanary = "3.0-alpha-8"
3333
lifecycle = "2.10.0"
3434
markdown = "0.35.0"
35-
metro = "0.10.3"
35+
metro = "0.10.4"
3636
moshi = "1.15.2"
3737
moshix = "0.34.4"
3838
okhttp = "5.3.2"

0 commit comments

Comments
 (0)