Skip to content

Releases: ZacSweers/metro

0.2.0

22 Apr 04:06
Compare
Choose a tag to compare
  • New: Nullable bindings are now allowed! See the nullability docs for more info.
  • Enhancement: Add diagnostics for multibindings with star projections.
  • Enhancement: Add diagnostic for map multibindings with nullable keys.
  • Fix: Ensure assisted factories' target bindings' parameters are processed in MetroGraph creation. Previously, these weren't processed and could result in scoped bindings not being cached.
  • Fix: Fix duplicate field accessors generated for graph supertypes.
  • Add compose navigation sample.

Special thanks to @bnorm and @yschimke for contributing to this release!

0.1.3

19 Apr 03:21
Compare
Choose a tag to compare
  • Change: Multibindings may not be empty by default. To allow an empty multibinding, @Multibinds(allowEmpty = true) must be explicitly declared now.
  • New: Write graph metadata to reports (if enabled).
  • New: Support configuring debug and reports globally via metro.debug and metro.reportsDestination Gradle properties (respectively).
  • Enhancement: Change how aggregation hints are generated to improve incremental compilation. Externally contributed hints are now looked up lazily per-scope instead of all at once.
  • Enhancement: Optimize empty map multibindings to reuse a singleton instance.
  • Enhancement: Report error diagnostic if Dagger's @Reusable is used on a provider or injected class.
  • Enhancement: Tweak diagnostic error strings for members so that IDE terminals auto-link them better. i.e., instead of printing example.AppGraph.provideString, Metro will print example.AppGraph#provideString instead.
  • Enhancement: Support repeatable @ContributesBinding annotations with different scopes.
  • Fix: Fix incremental compilation when @Includes-annotated graph parameters change accessor signatures.
  • Fix: Don't allow graph extensions to use the same scope as any extended ancestor graphs.
  • Fix: Don't allow multiple ancestor graphs of graph extensions to use the same scope.
  • Fix: Handle scenarios where the compose-compiler plugin runs before Metro's when generating wrapper classes for top-level @Composable functions.
  • Fix: Fix an edge case in graph extensions where child graphs would miss a provided scoped binding in a parent graph that was also exposed as an accessor.
  • Fix: Fix Dagger interop issue when calling Javax/Jakarta/Dagger providers from Metro factories.
  • Fix: Fix Dagger interop issue when calling dagger.Lazy from Metro factories.
  • Fix: Preserve the original Provider or Lazy type used in injected types when generating factory creators.
  • Temporarily disable hint generation in WASM targets to avoid file count mismatches until KT-75865.
  • Add an Android sample: https://github.com/ZacSweers/metro/tree/main/samples/android-app
  • Add a multiplatform Circuit sample: https://github.com/ZacSweers/metro/tree/main/samples/circuit-app
  • Add samples docs: https://zacsweers.github.io/metro/samples
  • Add FAQ docs: https://zacsweers.github.io/metro/faq

Special thanks to @JoelWilcox, @bnorm, and @japplin for contributing to this release!

What's Changed

  • Support qualifiers and implicit boundTypes in dagger-anvil rank interop by @JoelWilcox in #293
  • Update plugin com.gradle.develocity to v4 by @renovate in #303
  • Update dependency com.google.devtools.ksp to v2.1.20-2.0.0 by @renovate in #304
  • Unify FIR predicate definitions by @JoelWilcox in #305
  • Update okio to v3.11.0 by @renovate in #307
  • Fix repeatable @ContributesTo annotations being missed when aggregating contributions from downstream modules by @JoelWilcox in #308
  • Update dependency Markdown to v3.8 by @renovate in #310
  • Start an FAQ doc by @ZacSweers in #315
  • Optimize Map*Factory when empty by @ZacSweers in #317
  • Add Circuit & Android samples by @ZacSweers in #311
  • Disallow empty multibindings by default by @ZacSweers in #319
  • Update circuit to v0.27.1 by @renovate in #320
  • Update dependency mkdocs-material to v9.6.12 by @renovate in #326
  • Update kotlinInject.anvil to v0.1.4 by @renovate in #325
  • Update dagger to v2.56.2 - autoclosed by @renovate in #324
  • Update plugin poko to v0.18.6 by @renovate in #323
  • Check for overlapping/conflicting ancestor scopes by @ZacSweers in #322
  • Generate per-scope hint overloads by @ZacSweers in #328
  • Record lookups to included graph dep accessors by @ZacSweers in #329
  • Support repeatable @ContributesBinding annotations with different scopes by @JoelWilcox in #321
  • Issue 309 - Fix runtime class cast exception when interoping with javax provider by @japplin in #327
  • Another test repeated ContributesBinding with different scopes and same bound type by @japplin in #212

Full Changelog: 0.1.2...0.1.3

0.1.2

08 Apr 15:49
Compare
Choose a tag to compare
  • Enhancement: Implement createGraph and createGraphFactory FIR checkers for better error diagnostics on erroneous type arguments.
  • Enhancement: Add ContributesBinding.rank interop support with Anvil.
  • Enhancement: Check Kotlin version compatibility. Use the metro.version.check=false Gradle property to disable these warnings if you're feeling adventurous.
  • Fix: Fix class-private qualifiers on multibinding contributions in other modules not being recognized in downstream graphs.
  • Fix: Fix member injectors not getting properly visited in graph validation.
  • Fix: Fix a bug where Map<Key, Provider<Value>> multibindings weren't always unwrapped correctly.
  • Fix: Fix Map<Key, Provider<Value>> type keys not correctly interpreting the underlying type key as Map<Key, Value>.
  • Change: Change InstanceFactory to a value class.
  • Change: Make providerOf use InstanceFactory under the hood.

Special thanks to @JoelWilcox, @bnorm, @japplin, @kevinguitar, and @erawhctim for contributing to this release!

What's Changed

New Contributors

Full Changelog: 0.1.1...0.1.2

0.1.1

03 Apr 16:17
Compare
Choose a tag to compare

Initial release!

See the announcement blog post: https://www.zacsweers.dev/introducing-metro/