Update metro to v1.4.0 - #1213
Merged
Merged
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:
1.3.2→1.4.01.3.2→1.4.01.3.2→1.4.0Release 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!
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.