Skip to content

chore(deps): update dependency io.insert-koin.compiler.plugin to v1#281

Open
renovate[bot] wants to merge 1 commit into
devfrom
renovate/major-koincompilerplugin
Open

chore(deps): update dependency io.insert-koin.compiler.plugin to v1#281
renovate[bot] wants to merge 1 commit into
devfrom
renovate/major-koincompilerplugin

Conversation

@renovate

@renovate renovate Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
io.insert-koin.compiler.plugin (source) 0.6.21.0.2 age confidence

Release Notes

InsertKoinIO/koin-compiler-plugin (io.insert-koin.compiler.plugin)

v1.0.2

Compare Source

A correctness-focused maintenance release: it removes several false compile-safety errors in multi-module projects, fixes duplicate-hint KLIB failures on iOS/Native/WASM-JS, and hardens per-compilation state under parallel Gradle daemons.

🔑 Highlights

  • No more false "missing dependency" errors across modules — a @Module whose dependency is provided by a sibling module (assembled only at @KoinApplication / startKoin) no longer fails with KOIN-D001. It defers to the entry-point graph, and surfaces a new KOIN-W002 warning only when no complete closure is visible in the compilation (#​51).
  • iOS / Native / WASM-JS build reliability — cross-module @ComponentScan and cross-module top-level @Single functions no longer emit duplicate hint declarations that broke KLIB serialization (#​62).
  • Fewer false compile-safety errors on DSL code — typed DSL definitions with custom lambdas, indirect parametersOf helpers, and outer DSL qualifiers are now understood (#​36, #​49, #​61, #​41).
  • Compose entry point validatedKoinApplication(configuration = koinConfiguration { … }) now runs full-graph safety (#​38).

🐛 Fixes

False KOIN-D001 for cross-module (sibling) dependencies — #​51 (KTZ-4256)

In a layered multi-module build, a @Module is compiled without visibility of the sibling modules a downstream @KoinApplication(modules = […]) assembles alongside it. Per-module (A2) validation therefore reported a provider that lives in a sibling as a hard KOIN-D001 missing dependency. Validation now defers an unresolved binding when a provider hint for the type exists elsewhere on the build graph, settling it authoritatively at the entry-point closure (A3) or at runtime checkModules(). When no complete closure is present in the compilation (e.g. a leaf library module), it emits the new KOIN-W002 warning instead of an error.

Scope: this narrows the false positive to the common shape (provider is a compile dependency, or compiled alongside the consumer). A genuine missing dependency with no provider hint anywhere is still a hard KOIN-D001. A provider that lives in a non-dependency peer module (type declared in a shared module) is not yet distinguishable at the leaf and may still report — full A2 relaxation is planned for 1.1.

Duplicate hint declarations broke iOS / Native / WASM-JS — #​62 (KTZ-4365)

A cross-module @ComponentScan covering a dependency module's package, and cross-module top-level @Single functions, could register the same definition more than once — emitting duplicate componentscan_* / definition_function_* hint declarations. The JVM/DEX toolchain tolerated it (a D8 "multiple definitions" warning); KLIB serialization (iOS/Native/WASM-JS) rejected it with a hard SignatureClashDetector error. Definitions are now de-duplicated by class identity (and by type+qualifier for functions), so each is emitted exactly once per target.

False KOIN-D001 for typed DSL definitions with non-create lambdas — #​36, #​49

single<T> { existingInstance }, single<T> { provideX() }, viewModel { VM() } and similar shapes are now recognized as providing T, so compile-safety no longer reports T as a missing definition. The user's lambda is left untouched.

False KOIN-D006 for indirect parametersOf helpers — #​61

A call site passing an opaque params lambda (e.g. { buildParams() }) no longer triggers KOIN-D006 ("forgot parametersOf"). The diagnostic now fires only when no params lambda is present at all.

Qualifier lost on DSL create definitions — #​41

An outer DSL qualifier (single<T>(named("x")) { create(::T) }) is now propagated into the compile-safety hints, so qualified cross-module definitions resolve correctly instead of producing spurious mismatches.

Compose koinConfiguration { } entry point not validated — #​38

KoinApplication(configuration = koinConfiguration { modules(…) }) is now recognized as a Koin entry point, enabling full-graph (A3) compile-safety for Compose apps. The koinConfiguration call is only marked as an entry point — it is not rewritten, so runtime behavior is unchanged.

Flaky / order-dependent behavior under parallel Gradle daemons — (KTZ-4414)

Plugin config flags and the @PropertyValue registry were held in process-global mutable state shared across every compilation in a Gradle daemon. Parallel or interleaved compilations could read another build's flags or have a @PropertyValue default dropped. State is now held per-compilation (thread-local, rebound onto the IR phase), matching the existing per-compilation message-collector handling.

⚠️ Auto-binding excludes framework/marker supertypes — #​43, #​64

This changes generated code and can affect runtime resolution. Auto-detected bindings no longer include framework plumbing / marker supertypes: kotlin.Any, org.koin.core.component.KoinComponent, KoinScopeComponent, and androidx.lifecycle.ViewModel / AndroidViewModel. Previously a @KoinViewModel / @Single class implementing one of these could be auto-bound to the framework base type, letting get<ViewModel>() / get<KoinComponent>() resolve to an arbitrary component (silent wrong-instance resolution). A definition is now registered under its own type and its genuine domain interfaces only.

Explicit bindings are unaffected@Single(binds = [ViewModel::class]) still binds exactly what you list. If you relied on auto-binding to one of the excluded supertypes, add it explicitly with binds = [...].

✅ Compatibility

Kotlin 2.3.20 Kotlin 2.4.0
JVM / Android
iOS / Native
WASM/JS — DSL
WASM/JS — annotations ⚠️ KT-82395
  • Koin: 4.2.0+

📦 Install

plugins {
    id("io.insert-koin.compiler.plugin") version "1.0.2"
}

Full changelog: InsertKoinIO/koin-compiler-plugin@1.0.1...1.0.2

v1.0.1

Compare Source

A maintenance release focused on Kotlin 2.4.0 support and Kotlin/Native + WASM/JS build reliability. One plugin artifact now spans Kotlin 2.3.20 → 2.4.x.

🔑 Highlights

  • Kotlin 2.4.0 support — the plugin no longer crashes on Kotlin 2.4.0, and the same artifact also works on Kotlin 2.3.20.
  • iOS / Native / WASM builds fixed — annotation definitions no longer break KLIB serialization.
  • @Single(createdAtStart = true) honored on definition functions — eager singletons are created at startKoin again.

🐛 Fixes

Kotlin version compatibility — #​19, #​42 (and koin#2431)

The plugin hard-crashed on the two most recent Kotlin versions:

  • Kotlin 2.4.0ClassCastException during FIR extension registration.
  • Kotlin 2.3.20NoSuchMethodError (IrDeclarationOrigin.IR_EXTERNAL_DECLARATION_STUB).

1.0.1 introduces a Kotlin version-adapter layer: the core is compiled against the stable IR API, and a small per-version adapter (selected at compile time) absorbs the breaking compiler-internal differences. A single published jar supports Kotlin 2.3.20 and 2.4.0; an unrecognized newer Kotlin gets a warning and best-effort support, while versions below the floor get a clear, actionable error instead of an internal crash.

Duplicate injectedparams_* signatures broke iOS + WASM/JS — #​44, #​40

A type collected by more than one @ComponentScan module generated the @InjectedParam hint function twice with identical signatures. The JVM tolerated it; KLIB serialization (iOS/Native/WASM/JS) rejected it with "Different declarations with the same signatures". The hint is now emitted exactly once per target. (Regression vs 1.0.0-RC2.)

WASM/JS KLIB serialization — #​40

The plugin's generated hint files lacked a resolvable source, failing the JS/WASM KLIB serializer ("No file found for source null"). Fixed — DSL-based projects now build on WASM/JS.

@Single(createdAtStart = true) silently dropped — koin#2425, koin#2415

createdAtStart = true on a @Single / @Singleton definition function inside a @Module was discarded in codegen, so eager singletons were never created at startKoin (no error or warning). Now propagated correctly. (The @Module(createdAtStart) and @Singleton class cases were already fixed in 1.0.0-RC3.13.)

⚠️ Known limitation — annotation-based WASM/JS on Kotlin 2.3.20

Annotation-based projects (@Module / @ComponentScan) targeting WASM/JS require Kotlin 2.4.0. On Kotlin 2.3.20 they hit an upstream Kotlin compiler bug — KT-82395 — in the JS/WASM KLIB metadata serializer, which the plugin cannot work around. Kotlin 2.4.0 resolves it. (iOS/Native and DSL-based WASM/JS are unaffected and work on both Kotlin versions.)

✅ Compatibility

Kotlin 2.3.20 Kotlin 2.4.0
JVM / Android
iOS / Native
WASM/JS — DSL
WASM/JS — annotations ⚠️ KT-82395

📦 Install

plugins {
    id("io.insert-koin.compiler.plugin") version "1.0.1"
}

Full changelog: InsertKoinIO/koin-compiler-plugin@1.0.0...1.0.1

v1.0.0

Compare Source

Koin Compiler Plugin 1.0.0

The first stable release. RC1 shipped in April 2026; over the following weeks the safety pass, incremental-compilation handling, and K2.3.20 compatibility came together. The compiler-plugin path is now ready for production: full-graph compile-time safety, cross-module call-site validation, IC-aware safe-defaults, and K2.3.20 support.

Requires: Kotlin 2.3.20+ (K2) | Koin 4.2.1+


What's New Since 1.0.0-RC2

Compile-time safety expanded (A2/A3/A4)
  • Circular dependency detection — cycles like A → B → A are caught during graph traversal in A2/A3, no longer waiting for runtime.
  • Call-site validation with dynamic parametersget<T> { parametersOf(...) } and ViewModel/inject sites with parametersOf {} flows are validated against the assembled graph.
  • Compose-wrapped lambdas — A4 traverses Compose lambdas, so koinViewModel<T>() inside @Composable builders is validated like any other call site.
  • Qualifier-collision guard — A4 reports when two definitions resolve to the same (raw class + qualifier) key, preventing silent last-wins overrides at runtime.
  • KOIN-D007@Factory returning a type that extends a suspend fun interface is now blocked at compile time (previously crashed Fir2Ir).
  • Bare koinConfiguration / koinApplication / startKoin no longer bypass A3 — the full-graph pass runs even without an explicit <T> type parameter.
  • Cross-module DSL visibility under typed startKoin<T>() — A4 now sees DSL module { … } definitions declared in dependency JARs when the aggregator uses the typed entry point.
Incremental compilation & build robustness
  • strictSafety flag — auto-enabled on modules that contain startKoin, koinApplication, or @KoinApplication. Forces the full-graph safety pass to re-run on the aggregator each build, working around two K2 IC gaps: DSL changes inside module { } lambda bodies (not part of any declaration's ABI) and @ComponentScan package-scope discovery (no source-level edge). Library and feature modules stay fully incremental.
  • Module-disambiguated hint file names — stable anchors prevent cross-module Hints.kt collisions during multi-platform builds.
  • kapt / Hilt coexistence — defensive guard around KtPsiSourceElement.psi prevents Fir2Ir crashes when the plugin runs alongside kapt or Hilt during migration.
Kotlin 2.3.20 compatibility
  • Fir2Ir crash on K2.3.20HINTS_PACKAGE is now claimed unconditionally, fixing a regression when building against the latest K2.
Annotation fixes
  • @Module(createdAtStart = true) — was silently ignored; now correctly forwards the flag to the generated module { }.
  • @Scope(name = "…") — previously produced no bean definition; the scope DSL is now generated as expected.
  • @ScopeId(name = "…") — resolution behaviour locked in via regression coverage.
Diagnostics
  • CTA banner ordering — error reports anchor on the last error in the chain and use a per-extension collector, so the actionable hint is always closest to the offending call site.
  • Compiler error info — error frames now embed the diagnostic code and a single-line "how to fix" pointer.
Performance
  • Memoized startKoin module discovery — repeated scans during a single compilation reuse the resolved module set.
  • Indexed @ComponentScan filtering — package-scope discovery now uses an indexed lookup instead of repeated linear scans, noticeably faster on large multi-module projects.
Repo / docs
  • Playground apps moved into the main repo (playground-apps/app-dsl, playground-apps/app-annotations) — single clone, single build, no separate repo to keep in sync.
  • Documentation updatesstrictSafety, K2.3.20 minimum, circular-dep detection at compile time, KOIN-D007.

Behaviour changes to note when upgrading

strictSafety is on by default on aggregator modules. If your app contains startKoin, koinApplication, or @KoinApplication, that module's compileKotlin task will re-run the A3 safety pass on every build (library/feature modules unaffected). The cost is bounded, and it closes the IC gaps that previously let graph changes slip through cached builds. Set koinCompiler { strictSafety = false } to opt out.

Kotlin minimum bumped to 2.3.20 (was 2.3.0) — the Fir2Ir fix requires the newer compiler. If you're pinned to 2.3.0, stay on 1.0.0-RC2 until you can upgrade.


Closed issues since the project went public

Fixed
Won't fix / deferred
  • #​21 — IDE cannot resolve generated module() extension (@​JordanLongstaff) — documented as a known limitation pending IDE-side support
  • #​33 — Feature request: wasmJs target support (@​dmitry-stakhov) — tracked for a future release
Cross-repo fixes
  • koin#2368@ScopeId(name = "…") resolution behaviour
  • koin#2380 — typed startKoin<T> + @KoinApplication(modules=[…]) + scanned @KoinViewModel
  • koin#2400 — nested DSL includes(...) reachability
  • koin#2402 — explicit @KoinApplication(modules = [...]) overrides discovered @Configuration

Contributors

Project lead: @​arnaudgiuliani (Arnaud Giuliani)

Code contributions (commit authors and merged PRs across all releases):

  • @​flaringapp — explicit bindings in @Module provider functions (PR #​23)
  • @​JellyBrick — IR generation OOM fix (PR #​5), Gradle release signing fix (PR #​4)
  • @​wjz2001 — cross-module @ComponentScan hints without @Configuration (PR #​25)
  • Kevin Chiu — Gradle plugin package fix
  • Youssef Shoaib — runtime annotations provider, build improvements
  • @​Icyrockton
  • Brian Norman
  • Dmitriy Novozhilov
  • Kengo TODA
  • Roman Golyshev
  • soarex

Credits for techniques:

  • Zac SweersLookupTracker and ExpectActualTracker patterns from Metro

Issue reporters — the high-quality reproductions made all of this possible. See the closed-issues list above for the full set; everyone there contributed time and detail that shortened diagnosis significantly.

Internal feedback: Francois Dabonot (Kotzilla) — RC2.3 missing-artifact compile error came from his migration feedback.


Full changelog


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update dependency io.insert-koin.compiler.plugin to v1 May 23, 2026
@renovate renovate Bot changed the title chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Update dependency io.insert-koin.compiler.plugin to v1 May 28, 2026
@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update dependency io.insert-koin.compiler.plugin to v1 May 31, 2026
@renovate renovate Bot changed the title chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Update dependency io.insert-koin.compiler.plugin to v1 Jun 1, 2026
@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update koincompilerplugin to v1 Jun 2, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin to v1 Update koinCompilerPlugin to v1 Jun 3, 2026
@renovate renovate Bot changed the title Update koinCompilerPlugin to v1 chore(deps): update koincompilerplugin to v1 Jun 3, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin to v1 Update koinCompilerPlugin to v1 Jun 8, 2026
@renovate renovate Bot force-pushed the renovate/major-koincompilerplugin branch from 4a29f49 to 67a00fc Compare June 12, 2026 10:14
@renovate renovate Bot changed the title Update koinCompilerPlugin to v1 chore(deps): update koincompilerplugin to v1 Jun 12, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin to v1 Update koinCompilerPlugin to v1 Jun 15, 2026
@renovate renovate Bot changed the title Update koinCompilerPlugin to v1 chore(deps): update koincompilerplugin to v1 Jun 16, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin to v1 Update koinCompilerPlugin to v1 Jun 18, 2026
@renovate renovate Bot changed the title Update koinCompilerPlugin to v1 chore(deps): update koincompilerplugin to v1 Jun 19, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin to v1 chore(deps): update koincompilerplugin (major) Jun 22, 2026
@renovate renovate Bot changed the title chore(deps): update koincompilerplugin (major) chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Jun 25, 2026
@renovate renovate Bot changed the title chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Update dependency io.insert-koin.compiler.plugin to v1 Jun 29, 2026
@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Jul 2, 2026
@renovate renovate Bot changed the title chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Update dependency io.insert-koin.compiler.plugin to v1 Jul 11, 2026
@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Jul 12, 2026
@renovate renovate Bot changed the title chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Update dependency io.insert-koin.compiler.plugin to v1 Jul 12, 2026
@renovate renovate Bot force-pushed the renovate/major-koincompilerplugin branch from 67a00fc to 667ac7a Compare July 13, 2026 19:35
@renovate renovate Bot changed the title Update dependency io.insert-koin.compiler.plugin to v1 chore(deps): update dependency io.insert-koin.compiler.plugin to v1 Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants