Skip to content

0.6.2

Choose a tag to compare

@arnaudgiuliani arnaudgiuliani released this 03 Apr 17:16
· 140 commits to main since this release

Koin Compiler Plugin 0.6.2

Compatibility: Kotlin 2.3.20 · Koin 4.2.1-RC1

Bug Fixes

  • Fix #11 — WASM/JS type actualization — Actualize IR return types for generic Koin calls (Scope.get<T>(), getOrNull<T>(), inject<T>(), getAll<T>(), ParametersHolder.get<T>()). Prevents unbound IrTypeParameterSymbolImpl crashes on WASM/JS/Native targets. (3d9d2d8)

  • Fix #12 — Delegation pattern auto-binding — Respect binds = [] to suppress auto-binding. Classes using the delegation pattern (class Decorated(val delegate: MyService) : MyService) with @Singleton(binds = []) no longer cause recursive resolution stack overflows. (78f477c)

Performance

  • Cache referenceFunctions() lookups — Avoid repeated expensive compiler API calls across modules. Same CallableId queried N times → 1 real lookup + (N-1) O(1) cache hits.
  • Cache @Configuration module discoverydiscoverConfigurationModulesFromHints() results cached by label set. 10 modules with same labels → 1 discovery instead of 10.
  • Cache modulesByFqName map — Built once, reused across all module validations.
  • Batch hint IrFile creation — One IrFile per module instead of per definition, reducing synthetic file count from O(definitions) to O(modules).

Caching optimizations inspired by @JellyBrick (PR #5) 🙏

Compile Safety

  • Phase 3.6 guard — Cross-module call-site hint validation now only runs when a full graph has been assembled (via @KoinApplication). Prevents false positives in library modules without full graph visibility.

Build

  • Gradle signing fix — Only apply signing plugin when IS_RELEASE is set (PR #4).