Open
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:
0.12.1→0.13.00.12.1→0.13.00.12.1→0.13.0Release Notes
ZacSweers/metro (dev.zacsweers.metro)
v0.13.0Compare Source
2026-04-04
New
Circuit codegen
Metro now includes experimental built-in support for Circuit, a Compose-first architecture for building kotlin apps. See the docs for more details.
In the long term, this will eventually move out to a separate plugin that can gracefully participate with Metro's code gen APIs. This is initially implemented within Metro to ease development.
generateContributionProvidersThis release introduces a new
generateContributionProvidersAPI (Kotlin 2.3.20+) to optimize behavior with contributed APIs.Up to now, Metro's aggregation APIs (i.e.
@Contributes*binding annotations) have worked similar to Anvil, where the ultimately just generate@Bindsdeclarations as simple shorthands for the consuming graphs. This comes with the caveat that the injected class must be publicly visible if it's used outside of that module.Now, if you enable the new
generateContributionProvidersfeature, Metro will instead generate top-level@Providesdeclarations that mirror the injected class's inputs but only return its bound type. This means the annotated class can remaininternal, which both helps encapsulation and incremental compilation.The tradeoff is that
Implis no longer available directly on the graph. If you had any explicit code usages ofImpl, you would have to remove those too in favor of purely the bound type.[MEEP-1776]
@DefaultBindingThis release introduces a new
@DefaultBindingannotation that allows for setting a default binding on supertypes of contributed classes. This is useful for common base classes with generics that would otherwise require repetitive (or error-prone) explicitbinding<T>()declarations in subtypes.Enhancements
METRO_ERRORfor a general catch-all in a lot of places).Fixes
rankparameter when processing contributed binding containers.Changes
2.4.0-Beta1@Assisted.value. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.chunkFieldInitstransformProvidersToPrivatepublicProviderSeverity(usepublicScopedProviderSeverity)assistedIdentifierSeveritygenerateThrowsAnnotationContributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
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 has been generated by Renovate Bot.