1.4.1
New
- [FIR/IR/Circuit] Generate
CircuitSerializerRegistrationSet contributions for@CircuitSerializableScreenandPopResulttypes when using Circuit0.36.0or newer.
Fixes
- [FIR/IR] Generate contribution hints in FIR alongside IR class generation (Kotlin 2.4.20+), fixing downstream discovery for Metro's built-in contributions on all platforms.
- [FIR] Report an error when one annotation class combines multiple qualifier, scope, or map-key markers, such as both
@Qualifierand@MapKey. - [IR] Fix duplicate qualifier annotations on parameters of IR-generated member-injector methods.
- [IR] Inject inherited members in superclass-first order when using graph injection methods.
- [IR] Report duplicate bindings inherited from a parent graph when they are only requested by a child graph extension.
- [IR] Fix
@GraphExtension.Factoryreplacements acrossadditionalScopeswhen generating classes in IR. - [IR] Correctly report dependency cycles when the same dependency is requested both directly and through a provider or lazy value.
- [IR] Prevent stack overflows in large dependency graphs by checking cycles with heap-backed frames instead of recursive DFS traversal.
- [IR] Minimize deferred bindings when breaking overlapping dependency cycles.
- [IR] Do not require suspend provider support for caller-supplied suspend function
@Assistedparameters. - [IR] Fix a stack overflow when a nested graph extension requests a parent-scoped binding with suspend providers enabled.
- [IR] Prevent stack overflows while generating deeply nested/complex dependency graph expressions.
- [IR] Show shorter, consistent dependency paths in graph errors with improved route caching.
- [IC] Fix incremental compilation issue when adding or removing member injections from a superclass.
Changed
- Mentioned above in the fixes, but worth reiterating! Previously, graph-level member injector functions would incorrectly inject subclasses before ancestor classes. Now it correctly injects ancestors first, matching how
MembersInjectorand constructor-injected classes with member injection work. If you were relying on that behavior by accident, it's going to be different now!
Contributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
What's Changed
- Update Metro bootstrap to v1.4.0 by @renovate[bot] in #2608
- Update IDE version mappings by @ZacSweers in #2611
- Update ktor monorepo to v3.5.2 by @renovate[bot] in #2612
- Report duplicate bindings when only requested by children by @ZacSweers in #2613
- Add compiler-compat-latest artifact by @ZacSweers in #2615
- Fix graph extension factory replacements in IR by @ZacSweers in #2616
- Fix an edge case around mixed parallel cycle detection by @ZacSweers in #2619
- Update ksp monorepo to v2.3.11 by @renovate[bot] in #2621
- Update dependency zensical to v0.0.53 by @renovate[bot] in #2620
- Avoid stack overflows in cycle checking by @ZacSweers in #2622
- Add conflicting roles checker + fix another dup IR annotations by @ZacSweers in #2623
- Don't require suspend provider support for suspend assisted params by @ZacSweers in #2625
- Update circuit to v0.36.0 by @renovate[bot] in #2626
- Fix an SO in graph extension traversal with suspend providers by @ZacSweers in #2628
- Suspending assisted parameter requiers
metro.enableSuspendProvidersto be enabled by @scana in #2627 - Add expression limiting to long graph expression stacks by @ZacSweers in #2629
- Clean up FIR hint gen and IR class gen interactions by @ZacSweers in #2624
- Implement DiagnosticRoutes by @ZacSweers in #2630
- Properly minimize deferred bindings by @ZacSweers in #2632
- Fix circuit factory gen in IR class gen mode by @ZacSweers in #2633
- Support
@CircuitSerializableby @ZacSweers in #2631 - Fix an IC issue with superclass member injections by @ZacSweers in #2634
- Update IDE version mappings by @ZacSweers in #2635
- Update dependency com.android.tools:r8 to v9.2.23 by @renovate[bot] in #2636
- Fix ancestor member injection order from graph funs by @ZacSweers in #2637
Full Changelog: 1.4.0...1.4.1