chore(deps): update plugin zac-metro to v0.7.0 #2015
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.6.8
->0.7.0
Release Notes
ZacSweers/metro (dev.zacsweers.metro)
v0.7.0
Compare Source
2025-10-17
Dynamic Graphs
Dynamic graphs are a powerful new feature of the Metro compiler that allows for dynamically replacing bindings in a given graph. To use them, you can pass in a vararg set of binding containers to the
createDynamicGraph()
andcreateDynamicGraphFactory()
intrinsics.This is particularly useful for tests. See their docs for more information: Dynamic Graphs.
This API is experimental and may change in the future, please report any issues you encounter!
Implicit
@Inject
behavior on (most)@Contributes*
-annotated typesUp to this point, Metro has always required you to use
@Inject
on most@Contributes*
annotated types. However, this can feel a bit repetitive and tedious. In this release, there is a newcontributesAsInject
option that can be enabled that will treat all@Contributes*
annotated types as@Inject
by default. You can still use@Inject
on classes to be explicit, and if you have multiple constructors you must still use@Inject
on the constructor you want to be used.The only exception to this is
@ContributesTo
, which isn't applicable to injected types.This is disabled by default to start but will likely become the default in a future release.
Other Changes
assistedInjectMigrationSeverity
DSL. You must now move fully to using@AssistedInject
annotations for assisted types.@Provides
declarations. This means you could, for example, write a provider like so:@AssistedInject
-annotated classes.wasmWasi
targets to Metro's runtime.interopAnnotationsNamedArgSeverity
option.@Origin
annotations.getContainingClassSymbol()
(fixes Kotlin 2.3.0-x compatibility).Optional
binding fields.BindingLookup
.inner
classes.IncompatiblyScopedBindings
hint.Optional
types, avoiding accidental eager initialization in cycles.REDUNDANT_PROVIDES
.Special thanks to @erawhctim and @CharlieTap for contributing to this release!
v0.6.10
Compare Source
2025-10-11
Optional Dependency Behaviors
Graph accessors can now expose optional dependencies, just use
@OptionalDependency
on the accessor. Note that the accessor must declare a default body that Metro will use if the dependency is absent.There are a couple of optional configuration for Metro's optional dependency support that can be configured via the
optionalDependencyBehavior
Gradle DSL:DISABLED
- Disallows optional dependencies entirely.REQUIRE_OPTIONAL_DEPENDENCY
- Requires optional dependency parameters to also be annotated with@OptionalDependency
. This may be preferable for consistency with accessors and/or explicitness.DEFAULT
- The default behavior as described above — accessors must be annotated with@OptionalDependency
with default bodies and parameters just use default value expressions.Other changes
@BindsOptionalOf
. Note this is currently only limited tojava.util.Optional
.IrErrorType
encounters.statementsPerInitFun
to option to control the number of statements per init function. Only for advanced/debugging use.@Includes
types themselves (i.e., not their accessors) to be dependencies in generated graphs.@Provides
body diagnostics rather than returning early.open
members from abstract graph class superclasses to be accessors.open
modality as well.Special thanks to @ChristianKatzmann for contributing to this release!
v0.6.9
Compare Source
2025-10-07
This release introduces new experimental support for multiple compiler and IDE versions. The primary goal of this is to better support running Metro's FIR extensions across different IntelliJ Kotlin Plugin versions and make IDE support more robust, and general compiler compatibility falls out of that more or less for free. This is experimental and only going to target forward compatibility.
20
, but is configurable via themaxIrErrors
Gradle DSL option. If you want to restore the previous "fail-fast" behavior, you can set this value to1
.8.11
or later.Provider
andLazy
types forProvider<Lazy<T>>
injections.Provider<Lazy<T>>
accessor types.trace
functions to reduce overhead.MembersInjector
bindings.DependencyCycle
error messages.DependencyCycle
error messages. Aliases are now indicated with~~>
arrows instead of-->
..
separators instead of#
.UnsupportedOperationException
failures when reporting missing bindings.@AssistedInject
annotations are used on the target class.PsiElement
shading workaround when reporting diagnostics.MembersInjector
types as implicitly deferrable in binding graph validation.binding --> dependency
rather than the reverse for better readability.Special thanks to @kevinguitar, @hossain-khan, and @vRallev 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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.