0.5.0
- New: Experimental support for "binding containers" via
@BindingContainer
. See their docs for more details. - New: Add
keys-scopedProviderFields-*.txt
andkeys-providerFields-*.txt
reports to see generated field reports for graphs. - Enhancement: Remove
Any
constraint frombinding<T>()
, allowing bindings to satisfy nullable variants. - Enhancement: Add diagnostic to check for scoped
@Binds
declarations. These are simple pipes and should not have scope annotations. - Enhancement: Move graph dependency cycle checks to earlier in validation.
- Enhancement: When using Dagger interop, default
allowEmpty
to true when using Dagger's@Multibinds
annotation. - Enhancement: Make Dagger interop providers/lazy instances a
dagger.internal.Provider
internally for better compatibility with Dagger internals. Some dagger-generated code assumes this type at runtime. - Enhancement: Support javax/jakarta
Provider
types as multibinding Map value types when Dagger interop is enabled. - Enhancement: Completely skip processing local and enum classes as they're irrelevant to Metro's compiler.
- Enhancement: When reporting
@Binds
declarations in binding stacks, report the original declaration rather than inherited fake overrides. - Enhancement: Add interop support for kotlin-inject's
@AssistedFactory
annotations. - Enhancement: Add diagnostic to check for graph classes directly extending other graph classes. You should use
@Extends
. - Enhancement: Add diagnostic to check for
@Assisted
parameters in provides functions. - Enhancement: Add diagnostic to check duplicate
@Provides
declaration names in the same class. - Fix: Within (valid) cycles, topographically sort bindings within the cycle. Previously these would fall back to a deterministic-but-wrong alphabetical sort.
- Fix: Handle enum entry arguments to qualifier, scope, and map key annotations.
- Fix: Report the original location of declarations in fake overrides in error reporting.
- Fix: Handle default values on provides parameters with absent bindings during graph population.
- Fix: Don't try to read private accessors of
@Includes
parameters. - Fix: Don't quietly stub accessors for missing
Binding.Provided
bindings. - Fix: Check constructor-annotated injections when discovering scoped classes in parent graphs.
- Fix: Fix
BaseDoubleCheck.isInitialized()
. - Fix: Gracefully fall back to
MessageCollector
for graph seal and contributed graph errors on sourceless declarations. - Fix: Fix supporting overloads of binds functions from parent graphs or external supertypes.
- Fix: Fix generating binding functions with names that contain dashes.
- Fix: Treat interop'd Dagger/Anvil/KI components as implicitly extendable.
- Fix: Record lookups of
@Binds
declarations for IC. - Fix: Record lookups of generated class factories and their constructor signatures for IC.
Special thanks to @kevinguitar, @gabrielittner, @chrisbanes, @yschimke, and @ajarl for contributing to this release!
What's Changed
- Update dependency org.junit.jupiter:junit-jupiter to v5.13.2 by @renovate[bot] in #628
- Update dependency io.github.classgraph:classgraph to v4.8.180 by @renovate[bot] in #629
- Update ksp monorepo to v2.2.0-2.0.2 by @renovate[bot] in #630
- Update plugin poko to v0.19.0 by @renovate[bot] in #637
- Update atomicfu to v0.29.0 by @renovate[bot] in #636
- Update dependency com.facebook:ktfmt to v0.56 - autoclosed by @renovate[bot] in #635
- Update plugin binaryCompatibilityValidator to v0.18.0 by @renovate[bot] in #634
- Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.7.0 by @renovate[bot] in #632
- Update circuit to v0.29.0 by @renovate[bot] in #639
- Add a WorkManager sample by @yschimke in #578
- Update dependency androidx.work:work-runtime to v2.10.2 by @renovate[bot] in #641
- Update dependency com.squareup.okio:okio to v3.14.0 by @renovate[bot] in #642
- Update kotlinx.serialization to v1.9.0 by @renovate[bot] in #640
- Update okhttp monorepo to v5.0.0-alpha.17 by @renovate[bot] in #643
- Update dependency mkdocs-material to v9.6.15 by @renovate[bot] in #648
- Update circuit to v0.29.1 by @renovate[bot] in #646
- Update plugin shadow to v9.0.0-rc1 by @renovate[bot] in #652
- Update okio to v3.15.0 by @renovate[bot] in #650
- Update dependency androidx.navigation:navigation-compose to v2.9.1 by @renovate[bot] in #653
- Update kct to v0.8.0 by @renovate[bot] in #657
- Remove Any bound from binding.kt by @ZacSweers in #654
- Report the original location of declarations in fake overrides in error reporting by @ZacSweers in #658
- Handle absent bindings during graph population by @ZacSweers in #660
- Update okhttp monorepo to v5.0.0 by @renovate[bot] in #662
- Update ktor monorepo to v3.2.1 by @renovate[bot] in #661
- Update junit-framework monorepo to v5.13.3 by @renovate[bot] in #667
- Update dependency gradle to v8.14.3 by @renovate[bot] in #668
- Initial support of binding containers by @ZacSweers in #626
- Add diagnostic for scopes on binds annotations by @ZacSweers in #670
- Check constructor annotations in IrContributionVisitor by @ZacSweers in #671
- Support javax/jakarta Providers as map multibinding value types by @kevinguitar in #666
- Allow empty multibinding for Dagger's
@Multibinds
interop by @kevinguitar in #672 - Fix BaseDoubleCheck.isInitialized() check by @kevinguitar in #673
- Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.7.1-0.6.x-compat by @renovate[bot] in #674
- Update okhttp monorepo to v5.1.0 by @renovate[bot] in #675
- Update wire to v5.3.4 by @renovate[bot] in #678
- Update plugin spotless to v7.1.0 by @renovate[bot] in #676
- Prohibit direct graph extension of other graph classes by @ZacSweers in #679
- Add KI's new assistedfactory annotation by @ZacSweers in #680
- Log function name for IR param size difference error by @chrisbanes in #684
- Update wire to v5.3.5 by @renovate[bot] in #681
- Sort within SCCs by @ZacSweers in #683
- Update plugin binaryCompatibilityValidator to v0.18.1 by @renovate[bot] in #686
- Update dependency com.google.googlejavaformat:google-java-format to v1.28.0 by @renovate[bot] in #687
- Disallow assisted provides parameters by @ZacSweers in #688
- Fall back to MessageCollector for seal errors with no file by @ZacSweers in #693
- Handle enum arguments in renderAsAnnotationArgument by @ZacSweers in #695
- Another message collector fallback by @ZacSweers in #696
- Fix generating binding functions with names that contain - by @ajarl in #698
- Update plugin poko to v0.19.1 by @renovate[bot] in #699
- Propagate binding containers from annotation inclusions by @ZacSweers in #700
- Better handle empty graphs by @ZacSweers in #701
- Add checkers for binding containers by @ZacSweers in #702
- Binding containers interop by @ZacSweers in #705
- Run multiplatform tests on main only + macos by @ZacSweers in #706
- Add binding container IC tests by @ZacSweers in #707
- Fix factory class lookups in IC by @kevinguitar in #703
- Disallow contributed binding container for now by @ZacSweers in #708
- Revert "Disallow contributed binding container for now" by @ZacSweers in #709
- Implement contribution merging for binding containers by @ZacSweers in #710
New Contributors
- @chrisbanes made their first contribution in #684
- @ajarl made their first contribution in #698
Full Changelog: 0.4.0...0.5.0