Skip to content

Update metro to v1.1.1#6832

Merged
jmartinesp merged 2 commits into
developfrom
renovate/metro
May 21, 2026
Merged

Update metro to v1.1.1#6832
jmartinesp merged 2 commits into
developfrom
renovate/metro

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 21, 2026

This PR contains the following updates:

Package Change Age Confidence
dev.zacsweers.metro 1.0.01.1.1 age confidence
dev.zacsweers.metro:runtime 1.0.01.1.1 age confidence
dev.zacsweers.metro:gradle-plugin 1.0.01.1.1 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

ZacSweers/metro (dev.zacsweers.metro)

v1.1.1

Compare Source

2026-05-14

Changes
  • Update runtime artifacts' language and API version to 2.3.0. This was supposed to be in 1.1.0 but accidentally omitted, sorry!
Consider sponsoring Metro's development

v1.1.0

Compare Source

2026-05-13

This release is identical to 1.0.1 but removes support for Kotlin 2.2.20 and 2.2.21.

Consider sponsoring Metro's development

v1.0.1

Compare Source

2026-05-13

New
  • [FIR] Add a diagnostic warning that @Module.subcomponents is ignored by Metro (when Dagger interop is enabled).
  • [FIR] Add a diagnostic error for annotating @AssistedInject types with @Contributes* annotations, as they are not compatible.
Enhancements
  • [FIR] Resolve copied typerefs (if necessary) in FIR code gen. This appears to help avoid some IDE FIR issues.
  • [FIR] Make renderAnnotationArgument() more lenient.
  • [FIR] Handle FirNamedArgumentExpression in renderAnnotationArgument().
  • [FIR/tracing] Tracing now also covers the FIR phase. Each FIR session and each IR module fragment writes its own .perfetto-trace file. All files from a single compilation share an id prefix and use the naming <id>-<phase>-<moduleName>.perfetto-trace (e.g. 260505-133503-fir-commonMain.perfetto-trace, 260505-133503-ir-main.perfetto-trace).
  • [FIR/IR] Pure binding contributions (@ContributesBinding/@ContributesIntoSet/@ContributesIntoMap without @ContributesTo) are now routed through as binding containers instead of being merged into graphs as supertypes. This avoids one synthetic supertype per contributing class on the merged graph. This is the default behavior now. If you have any issues, you can temporarily disable via metro.compilerOptions.disable("binding-contributions-as-containers") to restore the supertype-merge behavior.
  • [IR] Make SwitchingProvider.invoke() faster by hoisting the id field into a local before the when, allowing the JVM backend to lower it to tableswitch (O(1)) instead of a chain of integer compares.
  • [IR] Empty Set multibindings accessed through a provider now emit SetFactory.empty() (a singleton) rather than allocating a builder and an empty backing set on every graph init.
  • [IR] Improve validation trace locations for providers generated by generateContributionProviders.
  • [IR] Annotate generated provider factory classes' mirror functions with @ComptimeOnly.
  • [IR] Mark generated @Binds getters as OPEN rather than leaving them ABSTRACT.
  • [IR] Make a number of compiler internals lazier, cached, or faster. Improves top-line compiler IR performance traces ~5–15%.
    • [IR] Do not process platform type supertypes.
    • [IR] Compare IrTypeKey instances structurally instead of by rendered strings.
    • [IR/graph] Pre-size internal hash collections to avoid resizing during validation.
    • [IR/graph] Faster compilation for modules with many @Binds/@ContributesBinding declarations by batching incremental-compilation lookup tracking per graph rather than per-callable.
    • [IR/graph] Small additional compile-time win from using cheaper short-lived working sets during binding-graph population.
    • [IR/graph] Significantly faster binding-graph validation on projects with deep or wide dependency graphs (the graph seal drops ~60% in benchmarks).
    • [IR/graph] When populating bindings from roots, track a processedKeys set so duplicate queue entries don't re-walk dependency lists. This avoids unnecessary extra iterations when doing an initial reachability walk.
    • [IR/graph] Merge two annotation walks in supertype collecting into a single pass with a per-annotation-class meta-annotation cache, so @Qualifier/@Scope-style annotations appearing across many supertypes are meta-walked once instead of N times.
  • [IR] Add (advanced use only) support for chunking supertype merging in graphs. This is only for extraordinarily large graphs that may contribute more supertypes than fit in a JVM class. See performance docs
  • [IR/reports] Improve readability of Kotlin IR dumps in reporting.
  • [IR/tracing] Add a lot more tracing spans for more granular tracing.
  • [IR/tracing] Don't delete previous traces on new compilations. Now traces are just added to the designated directory each compilation when enabled.
  • [IR/runtime] For multibound maps/sets with exactly one element, Metro now generates optimized IR that uses optimized SingletonSet/SingletonMap implementations at runtime and skips the unnecessary throwaway builder allocation. Note that, when using interop, the generated code for Dagger's internal set/map factories still generates the necessary builder intermediary.
  • [runtime/internal] Some runtime internal APIs now use @JvmStatic/@JsStatic or value classes where possible. Should be no difference to consumers.
Fixes
  • [IR] Fix Map<K, () -> V> multibindings on Kotlin/JS. Provider does not extend () -> T on JS, so when such a map was consumed via Provider<Map<K, () -> V>> the values were Metro Provider instances and weren't callable as JS functions, surfacing at runtime as TypeError: ... is not a function. Metro now uses a JS-only runtime MapFunctionFactory for these cases that stores correct () -> V lambdas.
  • [IR] Fix member injection Invalid type arg error when class has more generic type parameters than its parent.
  • [IR] Avoid generating nested @GraphExtension impl class file names that exceed the 255-byte per-segment filesystem limit. Deeply chained extensions now fall back to a stable hashed simple name once their projected basename would cross the threshold, and a warning is emitted at chain depths of 10+.
  • [IR/circuit] Fix Kotlin/Wasm call_ref precise-type mismatches in generated Circuit factories. Some platforms silently tolerated these IR-level type ambiguities, but Kotlin/Wasm rejects them at load-time.
    • Insert implicit casts when a generated Presenter.Factory/Ui.Factory dispatches its screen: Screen parameter to an underlying assisted factory or @Inject @&#8203;Composable function that expects a more specific Screen subtype.
    • Use the substituted return type when invoking the backing Provider<T> for non-wrapped injected dependencies. Without this, the IR call's type was the unsubstituted T.
  • [IR/circuit] Propagate qualifier annotations from @CircuitInject declarations to the generated factory classes.
Changes
  • Metro now uses... Metro! The Metro compiler now uses proper DI internally, bootstrapping itself. This isn't really anything library consumers have to think about, I just think it's neat.
  • Metro now runs IC integration tests on all major platforms it targets.
  • Test Kotlin 2.4.0-RC builds.
  • Test Kotlin 2.4.20 dev builds.
  • Test Android Studio Panda 4 Patch 1 (2025.3.4.7).
  • Test Android Studio Quail 1 Canary 4 (2026.1.1.4).
  • Update shaded Wire version to 6.3.0.
Contributors

Special thanks to the following contributors for contributing to this release!

Consider sponsoring Metro's development

Configuration

📅 Schedule: (UTC)

  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot requested a review from a team as a code owner May 21, 2026 02:01
@renovate renovate Bot added the PR-Dependencies Pull requests that update a dependency file label May 21, 2026
@renovate renovate Bot requested review from jmartinesp and removed request for a team May 21, 2026 02:01
@renovate renovate Bot force-pushed the renovate/metro branch from a145176 to 50d35a6 Compare May 21, 2026 05:43
@renovate renovate Bot changed the title Update metro to v1.1.0 Update metro to v1.1.1 May 21, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented May 21, 2026

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@github-actions
Copy link
Copy Markdown
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/mS5HMM

@sonarqubecloud
Copy link
Copy Markdown

@ElementBot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️

gradle/libs.versions.toml#L6 - A newer version of com.android.tools.build:gradle than 8.13.2 is available: 9.2.1

⚠️

gradle/libs.versions.toml#L20 - A newer version of androidx.media3:media3-ui than 1.10.0 is available: 1.10.1

⚠️

gradle/libs.versions.toml#L25 - A newer version of androidx.compose:compose-bom than 2026.05.00 is available: 2026.05.01

⚠️

gradle/libs.versions.toml#L35 - A newer version of io.github.takahirom.roborazzi:roborazzi-junit-rule than 1.60.0 is available: 1.63.0

⚠️

gradle/libs.versions.toml#L54 - A newer version of com.autonomousapps:dependency-analysis-gradle-plugin than 3.11.0 is available: 3.12.2

⚠️

gradle/libs.versions.toml#L101 - A newer version of androidx.javascriptengine:javascriptengine than 1.0.0 is available: 1.1.0

⚠️

gradle/libs.versions.toml#L124 - A newer version of androidx.compose.material3:material3 than 1.5.0-alpha15 is available: 1.5.0-alpha20

⚠️

gradle/libs.versions.toml#L182 - A newer version of org.matrix.rustcomponents:sdk-android than 26.05.18 is available: 26.05.20

⚠️

gradle/libs.versions.toml#L213 - A newer version of org.maplibre.compose:maplibre-compose than 0.12.1 is available: 0.13.0

⚠️

gradle/libs.versions.toml#L225 - A newer version of com.posthog:posthog-android than 3.43.0 is available: 3.44.2

⚠️

gradle/libs.versions.toml#L226 - A newer version of io.sentry:sentry-android than 8.41.0 is available: 8.42.0

⚠️

gradle/libs.versions.toml#L268 - A newer version of app.cash.paparazzi than 2.0.0-alpha04 is available: 2.0.0-alpha05

Generated by 🚫 dangerJS against 5bdee13

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.24%. Comparing base (0c3c9f4) to head (5bdee13).
⚠️ Report is 11 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6832      +/-   ##
===========================================
- Coverage    81.27%   81.24%   -0.04%     
===========================================
  Files         2649     2649              
  Lines        74219    74249      +30     
  Branches      9627     9627              
===========================================
  Hits         60324    60324              
- Misses       10342    10372      +30     
  Partials      3553     3553              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp
Copy link
Copy Markdown
Member

- Misses       10342    10372      +30 

...ok? That's weird, are we counting generated code as tested code too?

@jmartinesp jmartinesp merged commit eed183b into develop May 21, 2026
33 of 34 checks passed
@jmartinesp jmartinesp deleted the renovate/metro branch May 21, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants