Skip to content

fix(deps): update metro to v1.4.0 - #247

Merged
ShadowRZ merged 1 commit into
masterfrom
renovate/metro
Aug 3, 2026
Merged

fix(deps): update metro to v1.4.0#247
ShadowRZ merged 1 commit into
masterfrom
renovate/metro

Conversation

@renovate

@renovate renovate Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

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

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!


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 added the dependencies Project dependencies related issue / PR label Aug 3, 2026
@hanekokoro-bot

hanekokoro-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

Download Debug Artifacts: projectkafka-debug.zip

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 9.99%. Comparing base (211c9a5) to head (4b7cf00).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #247   +/-   ##
======================================
  Coverage    9.99%   9.99%           
======================================
  Files         326     326           
  Lines        8531    8531           
  Branches      657     657           
======================================
  Hits          853     853           
  Misses       7606    7606           
  Partials       72      72           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ShadowRZ
ShadowRZ merged commit 72a3d0e into master Aug 3, 2026
9 checks passed
@ShadowRZ
ShadowRZ deleted the renovate/metro branch August 3, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Project dependencies related issue / PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant