Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2025

This PR contains the following updates:

Package Change Age Confidence
dev.zacsweers.metro 0.8.2 -> 0.9.0 age confidence

Release Notes

ZacSweers/metro (dev.zacsweers.metro)

v0.9.0

Compare Source

2025-12-15

This release significantly improves the runtime performance of Metro-generated graphs, bringing them to parity with Dagger components' typical runtime performance (without fastInit enabled).

  • 🚀 Improves graph init runtime performance in large graphs by 30–40%
  • 🤏 Reduces generated graph code size by 60–70% (even higher if you heavily use multibindings)
  • [docs] Add runtime benchmarks to performance docs: https://zacsweers.github.io/metro/latest/performance#runtime-performance
  • [docs] Refresh build performance docs: https://zacsweers.github.io/metro/latest/performance#build-performance
  • [docs] Add a new quick start doc: Last bit: Metro now has a quick start doc! https://zacsweers.github.io/metro/latest/quickstart/
  • Behavior change: When using top-level function injection, the generated class now has the same name as the function. Previously it was suffixed with Class.
  • New: Experimental support for sharding large graphs. For extremely large dependency graphs on the JVM, their generated implementations could exceed the JVM class size limit. To avoid this, Metro now supports sharding within graphs (as needed) to distribute initialization code across multiple inner shard classes. This is currently disabled by default but can be enabled via the enableGraphSharding Gradle DSL property.
  • New: Support @Provides properties with @JvmField annotations.
  • Enhancement: Avoid unnecessary intermediate Provider instance allocations during graph expression gen. This means that when a direct type is requested in code gen, Metro will skip instantiating the intermediate MetroFactory instance if possible, avoiding unnecessary allocations.
  • Enhancement: Don't always generate accessors for multibinding contributors. This is no longer necessary now that we also avoid provider instance allocations, and should significantly reduce generated method counts if using a lot of multibindings.
  • Enhancement: Include graph roots in Provider refcounting. Previously, when detecting if Provider instance were used multiple times, Metro only checked for usages from other bindings.
  • Enhancement: For multibindings that would use Provider elements/values, mark their sources as provider-accessed in refcounting.
  • Enhancement: Don't generate provider fields for graph self instances unless necessary.
  • Enhancement: Improve accuracy of diagnostic location when reporting graph validation issues from binding callable declarations.
  • Enhancement: Validate bindings from interop with Dagger @BindsOptionalOf lazily.
  • Enhancement: [graph analysis] Title graph edges with semantically meaningful descriptions of the edge type. They should read a bit more like plain English.
  • Enhancement: [graph analysis] Better handle visualizing bound instance inputs.
  • Enhancement: [graph analysis] Better visualize member injection from graph injectors.
  • Enhancement: [metrox-viewmodel] Allow viewmodel map keys on callable and type targets.
  • Fix: Ensure IC lookups are recorded for all merged contributions.
  • Fix: Fix newInstance() args not stripping Lazy in top-level function inject classes.
  • Fix: Allow Any to be a binding<...>() type if no explicit supertypes are declared.
  • Fix: Mark MembersInjected bindings as deferrable in graph metadata reporting.
  • Fix: Use eager graphs for dominator tree analysis.
  • Fix: Don't apply replaces effect from excluded contributions (regular and binding containers).
  • Fix: Improve error messaging and hints when invisible map keys are detected.

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


Configuration

📅 Schedule: 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 this update again.


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

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

@WhosNickDoglio WhosNickDoglio merged commit 1bc03a5 into trunk Dec 16, 2025
11 checks passed
@renovate renovate bot deleted the renovate/dev.zacsweers.metro-0.x branch December 16, 2025 04:44
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.

2 participants