0.6.2
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>()). Preventsunbound IrTypeParameterSymbolImplcrashes 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. SameCallableIdqueried N times → 1 real lookup + (N-1) O(1) cache hits. - Cache
@Configurationmodule discovery —discoverConfigurationModulesFromHints()results cached by label set. 10 modules with same labels → 1 discovery instead of 10. - Cache
modulesByFqNamemap — Built once, reused across all module validations. - Batch hint IrFile creation — One
IrFileper 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_RELEASEis set (PR #4).