Skip to content

1.4.1

Choose a tag to compare

@ZacSweers ZacSweers released this 06 Aug 18:46
· 249 commits to main since this release

New

  • [FIR/IR/Circuit] Generate CircuitSerializerRegistration Set contributions for @CircuitSerializable Screen and PopResult types when using Circuit 0.36.0 or 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 @Qualifier and @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.Factory replacements across additionalScopes when 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 @Assisted parameters.
  • [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 MembersInjector and 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

Full Changelog: 1.4.0...1.4.1