1.0.0-RC2
Pre-releaseKoin Compiler Plugin 1.0.0-RC2
Stability pass on top of RC1: fixes user-reported crashes on iOS/Native, multi-module dex-merge collisions, and a module load-order behaviour change that makes app-level overrides actually win.
Requires: Kotlin 2.3.x+ (K2) | Koin 4.2.1+
What's New Since 1.0.0-RC1
Cross-module visibility
@Module + @ComponentScanwithout@Configurationnow emits cross-module scan hints — previously scan-covered definitions were invisible to downstreamcompileSafetyunless the module was also@Configuration. See PR #25.@Single(binds = [...])on@Moduleprovider functions preserves binding metadata across module boundaries — consumers can now resolve interfaces bound via provider functions in a dependency JAR. See PR #23 / #22.
Fixes
- Module load order (koin#2402) — auto-discovered
@Configurationmodules now load first and explicit@KoinApplication(modules = [...])load last, so app-level overrides win over dependency defaults under Koin's last-wins semantics. - Duplicate call-site hint classes in multi-module Android builds (#20) — hint filenames are now prefixed with the compilation module identifier; no more
org.koin.plugin.hints.XxxCallsiteKtcollisions at dex merge. - Generic DSL types on iOS/Native (#18) — Kotlin/Native klib signature mangler no longer crashes on generic DSL types (
single<Navigator<Key>>()). Hint emission erases type arguments to match runtime Koin's erasure behaviour. - Arrow
Raise.bind()/ ktorresourceScope { bind() }crash (#17) —collectBindTypenow matches Koin'sbindby FqName, no longer intercepting unrelated librarybindfunctions. single<T> { create(::Impl) }with interface type parameter — the outer<T>is now registered as the provided type (previouslyImpl), sokoin.get<Interface>()compile-safety passes as expected.- Missing DSL-artifact error (RC2.3) —
@KoinViewModel/@KoinWorkerwithout their runtime artifact (koin-core-viewmodel/koin-android-workmanager) now fails the build with a clear message pointing at the missing dependency, instead of silently producing a broken definition. - Unit-returning top-level
@Singletonfunctions (RC2.2) — klib signature-clash fix; two qualified side-effect initializers no longer collide on iOS/JS/Wasm. - Custom qualifier annotations (RC2.1) — plain custom
@Qualifierannotations now produceTypeQualifier, matching runtimenamed<T>()/typeQualifier<T>()semantics.
Documentation
Extended docs on module load order, generic DSL types (with the named<T>() qualifier pattern used by koin-compose-navigation3), and troubleshooting the new missing-artifact compile error.
Behaviour change to note when upgrading
Module load order: if your app declares @KoinApplication(modules = [AppModule::class]) and AppModule defines a binding that is also defined in a @Configuration-discovered dependency module, the app's binding now wins (previously, the dep overrode the app). This is the documented last-wins semantic applied correctly — but if you were relying on the previous behaviour, reorder via an explicit modules = [Dep::class, AppModule::class] list to control load order precisely.
Contributors
Code contributions this release:
- @flaringapp — PR #23: cross-module
@Single(binds=[...])provider functions - @wjz2001 — PR #25: cross-module scan hints without
@Configuration
Ongoing contributors (carried over from RC1):
- Arnaud Giuliani — project lead
- @JellyBrick — caching optimisations (PR #5), Gradle release signing fix
- Kevin Chiu — Gradle plugin package fix
- Youssef Shoaib — runtime annotations provider, build improvements
Issue reporters — the reproductions were excellent, thank you:
- #17 — @gael-ft (Arrow
Raise.bind()crash) - #18 — @alex-z0, @corneloaie (generic iOS crash)
- #20 — @norbertsitko, @tusxxx, @rdietrichberlin (duplicate callsite hints, plus the
setHintPackageworkaround that informed the fix) - #22 — @flaringapp (cross-module
binds) - koin#2402 — @jmartinMone (module load order)
And Francois Dabonot (Kotzilla Slack), whose migration feedback drove the missing-artifact compile error introduced in RC2.3.