Skip to content

fix(deps): update metro to v1 - #637

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-metro
Open

fix(deps): update metro to v1#637
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-metro

Conversation

@renovate

@renovate renovate Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
dev.zacsweers.metro 0.13.21.4.0 age confidence
dev.zacsweers.metro:metrox-viewmodel-compose 0.13.21.4.0 age confidence
dev.zacsweers.metro:metrox-viewmodel 0.13.21.4.0 age confidence
dev.zacsweers.metro:gradle-plugin 0.13.21.4.0 age confidence
dev.zacsweers.metro:metrox-android 0.13.21.4.0 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.4.0

Compare Source

2026-07-30

New
Experimental support for suspend providers

This release introduces experimental support for suspend providers. This is disabled by default and can be enabled by the metro.enableSuspendProviders option. See the coroutines documentation for details.

  • @Provides functions and graph accessors can be suspend. Suspension propagates through dependent bindings. Metro reports a dependency trace when a non-suspend path reaches one.
  • Inject suspend () -> T to defer initialization until invocation, or SuspendLazy<T> to also cache the first successful result. Provider, function providers, Lazy, SuspendProvider, suspend functions, and SuspendLazy can be nested to any depth in a scalar wrapper stack.
    • When the underlying binding suspends, the wrapper closest to it must also support suspension. Maps can defer initialization of individual values with Map<K, suspend () -> V> or Map<K, SuspendProvider<V>>.
    • Wrapper layers and supported map values preserve nullable binding types.
  • Like ordinary scoped bindings, scoped suspend bindings are single-flight and retry after failures or cancellation. They also run on the coroutine context they were called on, so if this is important then you should use an appropriate withContext within your provider body.
  • The Gradle plugin automatically adds the new runtime-coroutines artifact when suspend providers are enabled. If runtime dependencies are managed manually, add it for scoped suspend bindings, suspendLazy, and injection requests containing SuspendLazy at any nesting level.
    • runtime-coroutines uses kotlinx-coroutines on every platform.
  • Note: Switching providers do not yet support suspend providers. You can still enable them, just scoped suspend provider fields will not be sharded into nested switching provider classes yet.
Other new stuff
  • [FIR/IR/Circuit] Support sub-circuits (i.e. the new @SubCircuitInject annotation).
Enhancements
  • Support private @Provides properties on Kotlin 2.4.20-Beta1 and newer.
  • [IR] Improve IC on Kotlin 2.3.20 by backporting compat support for the compiler's new declaration finder APIs.
  • [IR] Avoid generating unused provider fields for included graph accessors that can be read directly.
  • [IR] Avoid linear helper traversal in large switching providers by routing directly to the matching chunk.
  • [runtime] If the input function to provider() is already a Provider instance, return it directly rather than needlessly wrap it.
  • [runtime] Support nullable values in ordinary map multibinding factories, including provider and lazy map value forms.
Fixes
  • [FIR] Report a diagnostic when private @Provides properties are used without compiler support (i.e. pre-2.4.20).
  • [FIR] Report an error when a map key is applied (via type argument) to a binding without a corresponding @IntoMap or @ContributesIntoMap annotation.
  • [IR] Fix stale contribution hints after changing a contribution's scope during incremental compilation. This only affects Kotlin versions prior to 2.3.20.
  • [IR] Fix Kotlin/Native compilation failures when generated hidden classes were missing their Any supertype.
  • [IR] Prevent directly provided maps from satisfying suspend-provider-valued map requests unless the provided map uses that exact value type.
  • [IR] Avoid redundant nested DoubleCheck.lazy() calls when materializing Lazy graph accessors and binding parameters.
  • [IR] Correctly adapt function-provider accessors from included graphs when storing them as Metro Provider fields.
  • [IR] Fix graph implementations incorrectly inheriting the containing class of nested @ContributesTo interfaces with IR class generation.
  • [IR] Don't inline object, enum, or class-literal provider bindings when they're requested through Provider, Lazy, or provider-based multibindings.
  • [gradle] Respect metro.generateClassesInIr Gradle and system property overrides instead of replacing them with the Kotlin-version default.
  • Improve Kotlin 2.4.20-Beta2 support.
Changes
  • Refreshed benchmarks!
    • They now run against latest Metro, Dagger, and KSP versions.
      • Dagger + KSP have improved significantly 🚀.
    • They now also include Koin.
  • Build against Kotlin 2.4.10. Note the runtime artifacts still target Kotlin 2.3.0 and Metro supports a wide range of compiler versions. See the compatibility docs for a full table of compatible versions.
  • Test IntelliJ 2026.2 stable.
  • Test Android Studio Quail 4 canaries.
  • Switch shaded Mordan dependency to just mordant-core.
  • Update shaded Okio dependency to 3.18.1.
  • Update androidx.tracing to 2.0.0-rc01.
Contributors

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

v1.3.2

Compare Source

2026-07-13

Enhancements
  • [IR] Improve CLI diagnostic formatting by keeping messages on the compiler severity line.
  • [IR] Improve CLI diagnostic formatting by preserving generated-code metadata.
  • [IR/Circuit] Support IR class generation in Kotlin 2.4.20+.
Fixes
  • [FIR/IR] Fix generated factories and member injectors that retained source-owned generic type parameter references under Kotlin 2.5.
  • [IR] Fix generated generic call result and type argument types rejected by Kotlin 2.5's stricter IR validation.
Changes
  • Support Kotlin 2.5.0-dev-498.
  • Support Kotlin 2.4.20-Beta2.
  • Update embedded Wire dependency to 6.4.5.
Contributors

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

Consider sponsoring Metro's development

v1.3.1

Compare Source

2026-07-11

Fixes
  • [FIR] Report a diagnostic error when @DependencyGraph.Factory is used for a graph extension, instead of crashing.
  • [IR] Fix createGraphFactory() calls for graph factory interfaces compiled in upstream modules with IR-only class generation.
  • [IC] Fix stale graph callsites after non-assisted constructor parameters change on an assisted-injected type when the Compose compiler plugin is applied.
  • [IR/interop] Fix graph dependency accessors that return supported Lazy<T> or Provider<T> wrapper types.
  • [IR/interop] Fix a crash when member-injecting an unscoped constructor-injected binding as dagger.Lazy<T>.
Changes
  • Fold 2.4.20-dev-3583 compat into 2.4.20-dev-6138 as IntelliJ 2026.2 RCs now depend on a newer version.
  • Test Kotlin 2.4.10-RC2.
Contributors

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

Consider sponsoring Metro's development

v1.3.0

Compare Source

2026-07-01

New
  • [IR] Revamp graph-validation diagnostics with structured output. Taking some inspiration from Rust error messages.

    • Stable diagnostic IDs

    • Compact dependency chains

    • Aligned binding traces

    • Source snippets

    • help:/note: guidance in messages (replaces the previous (hint) sections)

    • Per-diagnostic docs links

    • Diagnostics now wrap to 100 columns and start on their own line after the compiler location prefix

    • Example plain output

      ExampleGraph.kt:9:3: error: 
      [Metro/MissingBinding] No binding found for String
      
        trace (in dev.zacsweers.example.ExampleGraph):
            String is requested at dev.zacsweers.example.ExampleGraph.a
      
        similar bindings:
            - CharSequence (Supertype. Type: Provided) - ExampleGraph.kt:12:3
      
        help: ensure String has an @&#8203;Inject constructor or is provided by an @&#8203;Provides or @&#8203;Binds
              declaration visible to ExampleGraph
        docs: https://zacsweers.github.io/metro/latest/diagnostics/#missingbinding
      
    • Example rich output

      (note that in rich terminals this would have color and markup too!)

      ExampleGraph.kt:9:3: error: 
        ╭─ [Metro/MissingBinding] No binding found for String
        │ → ExampleGraph.kt:9:3
        │
      9 │   val a: String
        │   ⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃
        ╰─
      
        trace (in dev.zacsweers.example.ExampleGraph):
            String is requested at dev.zacsweers.example.ExampleGraph.a
      
        similar bindings:
            • CharSequence (Supertype. Type: Provided) — ExampleGraph.kt:12:3
      
        help: ensure String has an @&#8203;Inject constructor or is provided by an @&#8203;Provides or @&#8203;Binds
              declaration visible to ExampleGraph
        docs: https://zacsweers.github.io/metro/latest/diagnostics/#missingbinding
      
  • [runtime/JVM] Add experimental runtime tracing for generated graph code, backed by AndroidX Tracing 2.x. Enable it with metro.enableRuntimeTracing. See the runtime tracing performance docs for setup guidance.

    • Metro will add the JVM-only metro-trace runtime helper artifact.
    • Graphs must bind an androidx.tracing.Tracer instances as a graph input as a parent tracer.
    • This is experimental as AndroidX Tracing 2.x is still actively being developed.
  • [gradle] Add a diagnosticsRenderMode Gradle option (AUTO/PLAIN/RICH) for diagnostic rendering.

    • AUTO defaults to rich output and falls back to plain output for non-empty NO_COLOR, --console=plain, and IDE-invoked builds.
    • The resolved mode is passed as a non-input compiler option, so render-mode changes do not invalidate compilation or poison build caches.
  • [docs] Add a generated Diagnostics Reference docs page for Metro's common graph validation diagnostics.

  • [FIR/IR] Add support for parameterless @Binds declarations for constructor-injected classes.

Enhancements
  • [FIR] Add a diagnostic to report mutable graph accessor properties.
  • [FIR] Add a diagnostic to report open classes annotated with @BindingContainer.
  • [FIR] Add a diagnostic to report scope annotations on graph factory parameters.
  • [IR] Add cycle-breaking help: guidance for dependency cycle errors, suggesting deferred types such as () -> T or Lazy<T>.
  • [IR/reporting] Collapse sibling missing-binding errors with identical trace tails to a ... same as for X continuation, and fully qualify type names only when two distinct types in one diagnostic share a simple name.
  • [docs] Improve docs around @GraphPrivate.
Fixes
  • [FIR] Improve diagnostic reporting locations for assisted factory parameter mismatches.
  • [FIR/IR] Fully qualify generated hint function names so scope classes with the same simple name don't collide.
  • [IR] Preserve substituted generic type arguments when generating assisted factory delegate parameters and dynamic graph container inputs.
  • [IR] Forward extension and context receivers when generated binding-container factories invoke the original binding function.
  • [IR] Fix dispatch receivers for generated graph factory functions and companion/object factory accessors.
  • [IR] Manage transitive simple class binding containers included by contributed binding containers when they have instance providers.
  • [IR] Patch declaration parents for generated @Binds mirror declarations so copied declarations remain attached to the correct generated class.
  • [IR] Preserve @GraphPrivate on cross-module mirror functions so private multibinding contributions do not leak through chained graph extensions.
  • [IR/Dagger interop] Report a clear diagnostic when an injected declaration or binding container from an upstream module was not processed by Metro, instead of crashing or reporting a generic compiler error.
  • [IR/Dagger interop] Fix an IR gen crash when an unscoped parent @Provides binding is injected as dagger.Lazy<T> from a child graph.
  • [IR/JS] Fix Map<K, () -> V> multibindings accessed through provider-style map factories on Kotlin/JS. Generated maps now store callable function values instead of Metro Provider objects.
  • [IR/KLIB] Fix generated @Binds implementations on KLIB backends. Metro now emits concrete identity bodies for inherited @Binds members where JS, Native, and Wasm validate abstract members during deserialization.
  • [IR/KLIB] Keep generated graph and shard backing fields private while preserving generated access through properties. This avoids backing-field visibility validation failures on KLIB backends.
  • [gradle] Fix multiplatform output collisions in MetroArtifactCopyTask.
Changes
  • Run Metro's functional compiler unit tests on JS.
  • Redundant checksum files are no longer published: checksums of .asc signature files (gradle/gradle#20232) and the sha256/sha512. If you rely on these, let me know.
  • Remove binding-contributions-as-containers flag, only binding-contributions-as-containers is supported going forward.
  • [gradle] Build against Gradle 9.6.1.
  • Test Kotlin 2.4.10-RC.
  • Test Kotlin 2.4.20-Beta1.
  • Test Android Studio Quail 2 RCs.
  • Test Android Studio Quail 3 canaries.
Contributors

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

Consider sponsoring Metro's development

v1.2.1

Compare Source

2026-06-11

New
  • [IR] Add support for generating metadata-visible classes entirely in IR, allowing Metro to move much of its current FIR code gen entirely to IR.
    • This is enabled by default (and only possible) on Kotlin 2.4.20-dev-6138 or newer and can be configured via the generateClassesInIr option. Do not try to enable this on older versions, your builds will fail and you will be sad.
Fixes
  • [FIR] Fix supertype merging not accounting for replaces coming from binding container contributions.
Changes
  • [gradle] Replace the rich-diagnostics compiler option and metro.richDiagnostics system property with diagnostics-render-mode and metro.diagnosticsRenderMode.
  • Test Kotlin 2.4.20-dev-6138.
  • Test IntelliJ 2026.2 EAPs.
Contributors

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

Consider sponsoring Metro's development

v1.2.0

Compare Source

2026-06-10

New
  • [interop] This release introduces experimental support for Hilt @InstallIn and @EntryPoint interop.
    • Enabled with metro { interop { includeHilt() } }
    • A @DependencyGraph(<scope>) automatically merges every @InstallIn(<component>) @&#8203;Module (as a binding container) and @InstallIn(<component>) @&#8203;EntryPoint (as a supertype) whose <component> maps to <scope>.
      • The eight standard Android Hilt components map to their canonical scopes out of the box.
      • User-declared @DefineComponent interfaces are resolved on demand by looking for an annotation on the same interface whose annotation class is itself annotated with @Scope (Hilt's own convention).
    • Both consuming Hilt-generated aggregation deps and also treating @InstallIn + @EntryPoint/@Module as interop are supported.
    • See the docs for the details and current limitations.
Enhancements
  • [compat] Improve IDE kotlinc version resolution. IntelliJ uses custom tags like 2.4.0-ij261-64 that are a little tricky to decipher.
  • [FIR] Add diagnostic guidance around inline @Provides declarations. TL;DR, they only make sense for public providers.
  • [FIR/IR] Inline constant @Provides bindings directly into generated graph implementations when possible, avoiding generated factory calls for literals, nulls, object singletons, enum entries, class literals, and const property reads. This is enabled by default and can be disabled with the enable-provider-inlining compiler flag if you see any issues.
  • [IR] Add a member-naming-strategy compiler option for shortening generated member names in generated code. Accepts DESCRIPTIVE (default), TYPED (provider*/instance*/factory*), or MINIMAL (single collapsed provider* naming). See docs/performance.md for guidance.
  • [IR] Lazily compute cached hashCode and toString renders for compiler-internal type keys without delegation.
  • [IR] Propagate inline modifiers from @Provides functions to factory newInstance() functions.
  • [IR] Preserve concrete generated provider factory return types where possible instead of widening to Factory<T>. In the future, Metro may generate these as value classes and this will allow better compiler optimization in those scenarios.
  • [IR/IC] Optimize IC tracking by buffering lookup and expect/actual records during IR and flushing them once after graph validation, avoiding per-write synchronization on the hot path. This is enabled by default but can be disabled via the buffered-ic-tracking compiler option if it causes any issues.
  • [IR/IC] Use newer compiler DeclarationFinder APIs on Kotlin 2.3.20+. These have more granular search scopes plus automatic IC tracking.
  • [IR/runtime] Add internal primitive instance factories and use them where possible for primitive graph inputs and inlined providers.
  • [gradle] Add a metroEnv task that writes human-readable Metro/Kotlin/Gradle environment reports for bug reports.
  • [reporting] Add compiler stats to reporting.
  • [runtime] Rework DoubleCheck synchronization on JVM and native targets.
    • On JVM, scoped bindings now synchronize on the DoubleCheck instance's own monitor (like Dagger) instead of allocating a ReentrantLock per instance, which also eliminates the spurious ReservedStackAccess JVM warning.
    • On native targets, the previous spinlock impl is replaced with a reentrant init guard whose contended callers park on a process-wide condition variable instead of busy-waiting.
      • On Apple platforms, parked waiters additionally donate their QoS class to the initializing thread to avoid priority inversion.
    • Notes for virtual thread (i.e. Project Loom):
      • JDK 21–23: synchronized can pin a virtual thread to its carrier if a scoped provider blocks during its one-time init (JEP 444).
      • JDK 24+ removes monitor pinning (JEP 491).
Fixes
  • [FIR] Loosen nonPublicContributionSeverity if generateContributionProviders is enabled. Note it will still fire on internal @ExposeImplBinding-annotated types.
  • [FIR] Fix compatibility with IntelliJ 2026.1.3.
  • [FIR] Don't merge generated binding containers from @ContributesInto* declarations as supertypes when aggregating contributions.
  • [FIR/JS/Wasm] Fix cross-module contributed graph extension factories on KLIB backends. Nested @GraphExtension.Factory @&#8203;ContributesTo(...) factories are now emitted as contribution hints and promoted as direct supertypes where needed, avoiding unresolved downstream calls such as createGraph<AppGraph>().createChildGraph() on JS/Wasm.
  • [IR] Fix graph extensions inheriting a farther ancestor's contribution-provider binding when a closer parent graph already owns a scoped binding for the same key.
  • [IR] Fix dynamic graphs (createDynamicGraph/createDynamicGraphFactory) sharing a single generated impl across call sites in different files. The shared impl was a private (on the JVM, package-private) nested class placed under one call site, so call sites in other packages failed at runtime with IllegalAccessError, and removing the owning file caused NoClassDefFoundError. Generated impls are now cached per-file.
  • [IR] Fix IR graph nodes eagerly resolving supertypes.
  • [IR] Don't reserve an InstanceFactory field for graph inputs unless it's needed.
  • [interop] Read @IntoSet/@IntoMap/@MapKey multibinding annotations from external Dagger modules.
Changes
  • Promote @GraphPrivate to stable.
  • Promote @DefaultBinding to stable.
  • Promote generateContributionProviders (and @ExposeImplBinding) to stable.
  • [compat] Rework compat factory resolution for dev compiler versions. Dev builds now only prefer dev-track factories that share the same base version (i.e. the same trunk lineage, like a 2.4.20-dev-* factory for a 2.4.20-dev-* compiler). When crossing base versions, lower-base dev factories and stable factories now compete on version and the highest wins, so a 2.4.20-dev-* compiler picks a 2.4.0 stable factory over a stale 2.4.0-dev-* one.
  • [gradle] Add missing experimental annotations to the Gradle plugin's analysis APIs. Sorry these were not meant to be stabilized yet!
  • Build against Kotlin 2.4.0. Note the runtime artifacts still target Kotlin 2.3.0 and Metro supports a wide range of compiler versions. See the compatibility docs for a full table of compatible versions.
  • No longer test most Kotlin 2.4.0 pre-release builds. Kotlin 2.4.0-dev-2124 is still tested because this appears to be roughly where IntelliJ platform 2026.1.x branched from.
  • Test Android Studio Quail 1 stable (2026.1.1.8).
  • Test Android Studio Quail 2 canaries (2026.1.2.4).
  • Test IntelliJ 2026.1.2.
  • Test IntelliJ 2026.1.3.
Contributors

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

Consider sponsoring Metro's development

Go Knicks!

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

v1.0.0

Compare Source

2026-04-27

This is the first stable release of Metro!

This means that its runtime APIs (runtime, metrox artifacts, Gradle plugin, etc) are now API stable unless annotated with an experimental annotation.

See the announcement post!

Consider sponsoring Metro's development

Changes since RC4

New
  • [runtime] Add an optional @Origin.context property, allowing generators to attach extra context to an origin if they want.
Enhancements
  • [IR] When a missing binding is a generated contribution provider for an unexposed impl class, include a hint about that in the MissingBinding error message.
Fixes
  • [FIR] Fix diagnostic reporting for injection sites referring to contribution classes is not annotated @ExposeImplBinding and generateContributionProviders is enabled. Previously it didn't report on all cases.
  • [IR] When reporting binding errors with generateContributionProviders enabled, if the referenced declaration is a @Contributes* binding then report the original declaration rather than the (source-less) generated declaration.
Changes
  • [compiler] Test Kotlin 2.3.21.
  • [ide] Test IntelliJ 2026.1.1.
  • [ide] Test Android Studio Panda 4.
  • [ide] Test Android Studio Quail canaries.
  • Update shaded androidx.tracing version to 2.0.0-alpha07.

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

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

@codecov

codecov Bot commented Apr 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.20%. Comparing base (f7e5b72) to head (1a912e1).

☔ View full report in Codecov by Harness.
📢 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.

@renovate renovate Bot changed the title fix(deps): update metro to v1 (major) fix(deps): update metro to v1 May 13, 2026
@renovate
renovate Bot force-pushed the renovate/major-metro branch 2 times, most recently from 924aca0 to 9b403ca Compare May 14, 2026 04:49
@renovate
renovate Bot force-pushed the renovate/major-metro branch from 9b403ca to 901965c Compare June 21, 2026 23:41
@renovate
renovate Bot force-pushed the renovate/major-metro branch from 901965c to c0aac1e Compare July 3, 2026 04:14
@renovate
renovate Bot force-pushed the renovate/major-metro branch 2 times, most recently from d5cbb91 to 883f4ce Compare July 14, 2026 06:05
@renovate
renovate Bot force-pushed the renovate/major-metro branch from 883f4ce to 1a912e1 Compare August 2, 2026 20:06
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