fix(deps): update metro to v1 - #637
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
renovate
Bot
force-pushed
the
renovate/major-metro
branch
2 times, most recently
from
May 14, 2026 04:49
924aca0 to
9b403ca
Compare
renovate
Bot
force-pushed
the
renovate/major-metro
branch
from
June 21, 2026 23:41
9b403ca to
901965c
Compare
renovate
Bot
force-pushed
the
renovate/major-metro
branch
from
July 3, 2026 04:14
901965c to
c0aac1e
Compare
renovate
Bot
force-pushed
the
renovate/major-metro
branch
2 times, most recently
from
July 14, 2026 06:05
d5cbb91 to
883f4ce
Compare
renovate
Bot
force-pushed
the
renovate/major-metro
branch
from
August 2, 2026 20:06
883f4ce to
1a912e1
Compare
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.13.2→1.4.00.13.2→1.4.00.13.2→1.4.00.13.2→1.4.00.13.2→1.4.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
ZacSweers/metro (dev.zacsweers.metro)
v1.4.0Compare 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.enableSuspendProvidersoption. See the coroutines documentation for details.@Providesfunctions and graph accessors can besuspend. Suspension propagates through dependent bindings. Metro reports a dependency trace when a non-suspend path reaches one.suspend () -> Tto defer initialization until invocation, orSuspendLazy<T>to also cache the first successful result.Provider, function providers,Lazy,SuspendProvider, suspend functions, andSuspendLazycan be nested to any depth in a scalar wrapper stack.Map<K, suspend () -> V>orMap<K, SuspendProvider<V>>.withContextwithin your provider body.runtime-coroutinesartifact when suspend providers are enabled. If runtime dependencies are managed manually, add it for scoped suspend bindings,suspendLazy, and injection requests containingSuspendLazyat any nesting level.runtime-coroutinesuses kotlinx-coroutines on every platform.Other new stuff
@SubCircuitInjectannotation).Enhancements
@Providesproperties on Kotlin2.4.20-Beta1and newer.2.3.20by backporting compat support for the compiler's new declaration finder APIs.provider()is already aProviderinstance, return it directly rather than needlessly wrap it.Fixes
@Providesproperties are used without compiler support (i.e. pre-2.4.20).@IntoMapor@ContributesIntoMapannotation.2.3.20.Anysupertype.DoubleCheck.lazy()calls when materializingLazygraph accessors and binding parameters.Providerfields.@ContributesTointerfaces with IR class generation.object, enum, or class-literal provider bindings when they're requested throughProvider,Lazy, or provider-based multibindings.metro.generateClassesInIrGradle and system property overrides instead of replacing them with the Kotlin-version default.2.4.20-Beta2support.Changes
2.4.10. Note the runtime artifacts still target Kotlin2.3.0and Metro supports a wide range of compiler versions. See the compatibility docs for a full table of compatible versions.2026.2stable.mordant-core.3.18.1.2.0.0-rc01.Contributors
Special thanks to the following contributors for contributing to this release!
v1.3.2Compare Source
2026-07-13
Enhancements
Fixes
Changes
2.5.0-dev-498.2.4.20-Beta2.6.4.5.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v1.3.1Compare Source
2026-07-11
Fixes
@DependencyGraph.Factoryis used for a graph extension, instead of crashing.createGraphFactory()calls for graph factory interfaces compiled in upstream modules with IR-only class generation.Lazy<T>orProvider<T>wrapper types.dagger.Lazy<T>.Changes
2.4.20-dev-3583compat into2.4.20-dev-6138as IntelliJ 2026.2 RCs now depend on a newer version.2.4.10-RC2.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v1.3.0Compare 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
Example rich output
(note that in rich terminals this would have color and markup too!)
[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-traceruntime helper artifact.androidx.tracing.Tracerinstances as a graph input as a parent tracer.[gradle] Add a
diagnosticsRenderModeGradle option (AUTO/PLAIN/RICH) for diagnostic rendering.AUTOdefaults to rich output and falls back to plain output for non-emptyNO_COLOR,--console=plain, and IDE-invoked builds.[docs] Add a generated Diagnostics Reference docs page for Metro's common graph validation diagnostics.
[FIR/IR] Add support for parameterless
@Bindsdeclarations for constructor-injected classes.Enhancements
openclasses annotated with@BindingContainer.help:guidance for dependency cycle errors, suggesting deferred types such as() -> TorLazy<T>.... same as for Xcontinuation, and fully qualify type names only when two distinct types in one diagnostic share a simple name.@GraphPrivate.Fixes
@Bindsmirror declarations so copied declarations remain attached to the correct generated class.@GraphPrivateon cross-module mirror functions so private multibinding contributions do not leak through chained graph extensions.@Providesbinding is injected asdagger.Lazy<T>from a child graph.Map<K, () -> V>multibindings accessed through provider-style map factories on Kotlin/JS. Generated maps now store callable function values instead of MetroProviderobjects.@Bindsimplementations on KLIB backends. Metro now emits concrete identity bodies for inherited@Bindsmembers where JS, Native, and Wasm validate abstract members during deserialization.Changes
.ascsignature files (gradle/gradle#20232) and thesha256/sha512. If you rely on these, let me know.binding-contributions-as-containersflag, onlybinding-contributions-as-containersis supported going forward.9.6.1.2.4.10-RC.2.4.20-Beta1.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v1.2.1Compare Source
2026-06-11
New
2.4.20-dev-6138or newer and can be configured via thegenerateClassesInIroption. Do not try to enable this on older versions, your builds will fail and you will be sad.Fixes
replacescoming from binding container contributions.Changes
rich-diagnosticscompiler option andmetro.richDiagnosticssystem property withdiagnostics-render-modeandmetro.diagnosticsRenderMode.2.4.20-dev-6138.2026.2EAPs.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v1.2.0Compare Source
2026-06-10
New
@InstallInand@EntryPointinterop.metro { interop { includeHilt() } }@DependencyGraph(<scope>)automatically merges every@InstallIn(<component>) @​Module(as a binding container) and@InstallIn(<component>) @​EntryPoint(as a supertype) whose<component>maps to<scope>.@DefineComponentinterfaces 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).@InstallIn+@EntryPoint/@Moduleas interop are supported.Enhancements
2.4.0-ij261-64that are a little tricky to decipher.inline@Providesdeclarations. TL;DR, they only make sense for public providers.@Providesbindings directly into generated graph implementations when possible, avoiding generated factory calls for literals, nulls, object singletons, enum entries, class literals, andconstproperty reads. This is enabled by default and can be disabled with theenable-provider-inliningcompiler flag if you see any issues.member-naming-strategycompiler option for shortening generated member names in generated code. AcceptsDESCRIPTIVE(default),TYPED(provider*/instance*/factory*), orMINIMAL(single collapsedprovider*naming). See docs/performance.md for guidance.inlinemodifiers from@Providesfunctions to factorynewInstance()functions.Factory<T>. In the future, Metro may generate these as value classes and this will allow better compiler optimization in those scenarios.buffered-ic-trackingcompiler option if it causes any issues.DeclarationFinderAPIs on Kotlin2.3.20+. These have more granular search scopes plus automatic IC tracking.metroEnvtask that writes human-readable Metro/Kotlin/Gradle environment reports for bug reports.DoubleChecksynchronization on JVM and native targets.DoubleCheckinstance's own monitor (like Dagger) instead of allocating aReentrantLockper instance, which also eliminates the spuriousReservedStackAccessJVM warning.synchronizedcan pin a virtual thread to its carrier if a scoped provider blocks during its one-time init (JEP 444).Fixes
nonPublicContributionSeverityifgenerateContributionProvidersis enabled. Note it will still fire on internal@ExposeImplBinding-annotated types.2026.1.3.@ContributesInto*declarations as supertypes when aggregating contributions.@GraphExtension.Factory @​ContributesTo(...)factories are now emitted as contribution hints and promoted as direct supertypes where needed, avoiding unresolved downstream calls such ascreateGraph<AppGraph>().createChildGraph()on JS/Wasm.createDynamicGraph/createDynamicGraphFactory) sharing a single generated impl across call sites in different files. The shared impl was aprivate(on the JVM, package-private) nested class placed under one call site, so call sites in other packages failed at runtime withIllegalAccessError, and removing the owning file causedNoClassDefFoundError. Generated impls are now cached per-file.InstanceFactoryfield for graph inputs unless it's needed.@IntoSet/@IntoMap/@MapKeymultibinding annotations from external Dagger modules.Changes
@GraphPrivateto stable.@DefaultBindingto stable.generateContributionProviders(and@ExposeImplBinding) to stable.devcompiler versions. Dev builds now only prefer dev-track factories that share the same base version (i.e. the same trunk lineage, like a2.4.20-dev-*factory for a2.4.20-dev-*compiler). When crossing base versions, lower-base dev factories and stable factories now compete on version and the highest wins, so a2.4.20-dev-*compiler picks a2.4.0stable factory over a stale2.4.0-dev-*one.2.4.0. Note the runtime artifacts still target Kotlin2.3.0and Metro supports a wide range of compiler versions. See the compatibility docs for a full table of compatible versions.2.4.0pre-release builds. Kotlin2.4.0-dev-2124is still tested because this appears to be roughly where IntelliJ platform 2026.1.x branched from.2026.1.1.8).2026.1.2.4).2026.1.2.2026.1.3.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
Go Knicks!
v1.1.1Compare Source
2026-05-14
Changes
Consider sponsoring Metro's development
v1.1.0Compare Source
2026-05-13
This release is identical to 1.0.1 but removes support for Kotlin
2.2.20and2.2.21.Consider sponsoring Metro's development
v1.0.1Compare Source
2026-05-13
New
@Module.subcomponentsis ignored by Metro (when Dagger interop is enabled).@AssistedInjecttypes with@Contributes*annotations, as they are not compatible.Enhancements
renderAnnotationArgument()more lenient.FirNamedArgumentExpressioninrenderAnnotationArgument()..perfetto-tracefile. 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).@ContributesBinding/@ContributesIntoSet/@ContributesIntoMapwithout@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 viametro.compilerOptions.disable("binding-contributions-as-containers")to restore the supertype-merge behavior.SwitchingProvider.invoke()faster by hoisting theidfield into a local before thewhen, allowing the JVM backend to lower it totableswitch(O(1)) instead of a chain of integer compares.Setmultibindings accessed through a provider now emitSetFactory.empty()(a singleton) rather than allocating a builder and an empty backing set on every graph init.generateContributionProviders.@ComptimeOnly.@Bindsgetters asOPENrather than leaving themABSTRACT.IrTypeKeyinstances structurally instead of by rendered strings.@Binds/@ContributesBindingdeclarations by batching incremental-compilation lookup tracking per graph rather than per-callable.processedKeysset so duplicate queue entries don't re-walk dependency lists. This avoids unnecessary extra iterations when doing an initial reachability walk.@Qualifier/@Scope-style annotations appearing across many supertypes are meta-walked once instead of N times.SingletonSet/SingletonMapimplementations 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.@JvmStatic/@JsStaticor value classes where possible. Should be no difference to consumers.Fixes
Map<K, () -> V>multibindings on Kotlin/JS.Providerdoes not extend() -> Ton JS, so when such a map was consumed viaProvider<Map<K, () -> V>>the values were MetroProviderinstances and weren't callable as JS functions, surfacing at runtime asTypeError: ... is not a function. Metro now uses a JS-only runtimeMapFunctionFactoryfor these cases that stores correct() -> Vlambdas.Invalid type argerror when class has more generic type parameters than its parent.@GraphExtensionimpl 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+.call_refprecise-type mismatches in generated Circuit factories. Some platforms silently tolerated these IR-level type ambiguities, but Kotlin/Wasm rejects them at load-time.Presenter.Factory/Ui.Factorydispatches itsscreen: Screenparameter to an underlying assisted factory or@Inject @​Composablefunction that expects a more specificScreensubtype.Provider<T>for non-wrapped injected dependencies. Without this, the IR call's type was the unsubstitutedT.@CircuitInjectdeclarations to the generated factory classes.Changes
2.4.0-RCbuilds.2.4.20dev builds.2025.3.4.7).2026.1.1.4).6.3.0.Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v1.0.0Compare Source
2026-04-27
This is the first stable release of Metro!
This means that its runtime APIs (
runtime,metroxartifacts, 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
@Origin.contextproperty, allowing generators to attach extra context to an origin if they want.Enhancements
MissingBindingerror message.Fixes
@ExposeImplBindingandgenerateContributionProvidersis enabled. Previously it didn't report on all cases.generateContributionProvidersenabled, if the referenced declaration is a@Contributes*binding then report the original declaration rather than the (source-less) generated declaration.Changes
2.3.21.2026.1.1.2.0.0-alpha07.This PR was generated by Mend Renovate. View the repository job log.