chore(deps): update dependency io.insert-koin.compiler.plugin to v1 - #281
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency io.insert-koin.compiler.plugin to v1#281renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/major-koincompilerplugin
branch
from
June 12, 2026 10:14
4a29f49 to
67a00fc
Compare
renovate
Bot
force-pushed
the
renovate/major-koincompilerplugin
branch
from
July 13, 2026 19:35
67a00fc to
667ac7a
Compare
renovate
Bot
force-pushed
the
renovate/major-koincompilerplugin
branch
from
July 29, 2026 18:39
667ac7a to
8978130
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.6.2→1.1.0Release Notes
InsertKoinIO/koin-compiler-plugin (io.insert-koin.compiler.plugin)
v1.1.0Compare Source
A compile-safety architecture release: per-module validation is removed entirely in favor
of a single, authoritative full-graph check at each Koin entry point. This closes a real,
measured false-positive class, at the cost of leaf modules with no entry point of their own now
getting no compile-time safety diagnostics until something assembles a real graph around them.
Also ships incremental-compilation freshness hardening,
allWarningsAsErrorscompatibility, and acollision-safe hint-file-naming scheme.
Why. A module validated in isolation cannot know how it will be wired into a larger app. This
stopped being theoretical:
:core:notificationsin a real playground app genuinely false-positivedon a dependency (
PeerService) that a peer module provides — with no Gradle edge between the two,the two are only unified downstream at the app's entry point. Per-module validation — checking a
module against its own definitions, its
includes = [...], and its@Configurationsiblings —cannot see that far, and reported a hard
KOIN-D001for a dependency that resolves correctly oncethe real app assembles both modules together. Rather than keep tuning the per-module oracle around
each new false-positive shape, per-module validation (and its "defer iff a provider exists
somewhere" oracle) is deleted outright. Full-graph validation — the check that runs at
startKoin/koinApplication/@KoinApplication— is now the sole compile-safety verifier.What this means for you:
startKoin/koinApplication/@KoinApplication):more accurate. Genuine cross-module false positives like the peer-provider case above disappear;
KOIN-D001now always shows the real, assembled graph.KOIN-D001(missing dependency),
KOIN-D004(circular dependency),KOIN-D005/KOIN-D006(parametersOfshape mismatches resolved via the graph), and
KOIN-P001(missing@PropertyValue) are nowsilent in that compilation — not because the module is safe, but because compile-time cannot
know how it will be assembled downstream. The graph is still checked, correctly, at the real
entry point once one exists in the compilation. This is disclosed via a default-visible
(INFO-severity) message rather than failing silently; see
logSeveritybelow to control itsvisibility.
KOIN-W002(the old "deferred, no provider hint found anywhere" warning) is deleted — thereis no more deferral machinery to warn about.
KOIN-D004) going silent for a leaf module is intentional, not aregression: detecting a cycle requires seeing the whole graph, and a same-module-only check was
never a complete cycle detector even under the old per-module validation (it only ever saw
local/sibling visibility).
Full account, including the design docs this reverses:
docs/COMPILE_SAFETY_A3_PLAN.md(superseded-banner) and
docs/COMPILE_TIME_SAFETY.md.🐛 Fixes
Orphaned
@Moduleclasses were silently treated as reachable (found during this release's own verification)A plain
@Module @​ComponentScan(...)class with no@Configurationand not referenced by anyone'sincludes = [...]was silently treated as part of the graph anyway, as long as the entry point useda bare/default-labeled
@KoinApplication/startKoin— the overwhelmingly common case. Its@ComponentScan-discovered definitions (including cross-module ones) were folded into the resolvedgraph and validated as satisfied, when the actual generated module tree never wired them in at all:
build green, runtime crash. Root cause: the entry-point module-discovery step accidentally called a
label-reader meant for the entry-point class's
@KoinApplication(configurations=[...])argumentagainst module classes, which never carry that annotation — so it always hit that reader's
"annotation absent" fallback (
["default"]), making any@Moduleclass match. This bug predates1.1.0 (traced to
1.0.0-GA1) but was masked by the old per-module validation, which used tovalidate each such module in isolation too; removing it made this bug load-bearing. Fixed, with a
regression test
(
entry_orphan_module_not_reachable_d001) proving an orphaned module without@Configurationor anincludesedge is now correctly excluded from the graph.KOIN-D001now names the real culprit module and source locationMissing-dependency errors now carry
file:linefor the failing definition and the actual owningmodule's name (previously degraded to a generic app/root label once every
KOIN-D001funnelsthrough the one remaining full-graph check). Also fixed: attribution for
FunctionDef-shaped definitionsused a bare simple name, which could collide across same-named modules in different packages — now
uses the fully-qualified name.
KOIN-D001deduplication across multiple entry pointsA module reachable from more than one
startKoin/koinApplication/@KoinApplicationin the samecompilation (common in test-apps: ~9 entry points is typical) previously re-validated and re-emitted
the same missing-dependency error once per entry point. Now deduplicated by (definition, missing
requirement), so a shared module with one real problem reports it exactly once.
D005/D006 (parametersOf shape checks) no longer require a Koin entry point
The
parametersOf(...)argument-count/presence check is graph-independent — the expected slots comefrom the target's own constructor, not from an assembled graph — so it now runs unconditionally
instead of being skipped whenever no entry point is present in the compilation, matching its actual
data dependency.
KOIN-D002(call-site resolution) correctly keeps requiring an assembled graphand stays silent without one — the two diagnostics no longer share a gate they don't share a
dependency on.
Cross-module qualifier and typed-scope resolution verified under the new sole-verifier design
New regression coverage confirms full-graph validation matches
@Namedqualifiers and typed@Scope(X::class)keys correctly across Gradle module boundaries, not just "some provider of thistype exists somewhere" — this matters more now that there's no per-module fallback to catch a wrong
match.
Known pre-existing limitation, found while writing this coverage (not new, not fixed this
release):
BindingRegistry.findProvider's scope-visibility check only matches a typed@Scope(X::class); a named@Scope(name = "...")provider has noscopeClassand is treatedas visible everywhere regardless of name.
🔒 Incremental-compilation freshness
Removing per-module leaf-local checking made full-graph validation's own freshness across
incremental (IC) rebuilds load-bearing in a way it wasn't before — these changes close that gap:
strictSafetyis now mandatory once an aggregator is auto-detected, not opt-in. Previously,an explicit
strictSafety = falsesilently won over the plugin's ownstartKoin/koinApplication/@KoinApplicationdetection, letting an aggregator'scompileKotlinstaycacheable/up-to-date even when the DI graph changed underneath it (lambda-body DSL edits and
new
@ComponentScan-covered files don't register as ABI changes IC can see).strictSafety = truestill works everywhere; the new escape hatch for a genuine detector misfire (the marker appears
only in a comment/string, not a real entry point) is
strictSafetyForceOff = true— a separate,explicit acknowledgement from a plain
false.KoinDSLTransformer's 5 DSL definition call sites now registerwith
ExpectActualTracker(alongside the existingLookupTrackercalls), matching the pairingKoinAnnotationProcessor/KoinStartTransformeralready had — closes another source of staleincremental state around DSL hint files.
@ComponentScannew-file freshness gap did not reproduce: adding a new@Singleton/@Factoryclass to a scanned package is itself a source-set input change, whichGradle already invalidates the owning module's
compileKotlintask for, independent of anythingKoin-specific — verified live on a real playground app. No plugin-side fix was needed here.
includes()or its last local definition removed, with nothing replacing it) is not detectedincrementally without a full clean +
--no-build-cache. This is a K2-internals residual (akeep-alive hint's signature not being re-resolved within one IC session), not a missing source
edge — see
playground-apps/README.md's "Known limitation" note.🔇
allWarningsAsErrors/-Werrorcompatibility (#73)Informational plugin output (
userLogs/debugLogsmessages, the@Monitor-tracing-enabledsummary) was emitted at WARNING severity unconditionally, which fails a build compiled with
allWarningsAsErrorseven though none of it is a real diagnostic.logSeverityoption ("warning"default, or"info") covers all of the above.versionCheckSeverityoption covers only the Kotlin-version-compatibilitywarning ("you're on an unverified Kotlin version") — kept independent because muting informational
noise shouldn't also silence a real compiler-compatibility risk; set it to
"info"only afterassessing that risk yourself.
KOIN-Dxxx/KOIN-Wxxx/etc.) are unaffected by either setting — they alwaysreport at their own severity.
koinCompiler { logSeverity = "info" // downgrade informational output, default "warning" versionCheckSeverity = "info" // downgrade the version-compatibility check, default "warning" }🧷 Hint-file collision safety (#75)
Five internal call sites that generate synthetic hint file names for cross-module discovery used
unbounded-length, collision-prone name sanitization (e.g.
p.q_r.modandp.q.r_modbothflattening to
p_q_r_mod). All five now go through one shared utility: a bounded, readable prefixplus a 64-bit hash suffix computed over the untruncated input, so truncation itself can never cause
a collision — this is a plain naming fix, not a diagnostic; file names have no external
reconstructors, so this changes freely.
Separately, the frozen, cross-version-reconstructed function-name encoder
(
flattenFqNameForHint) stays unchanged (other Kotlin modules built with an older plugin versionreconstruct it, so it can't just be swapped for a hash) — but two distinct DSL module ids can still
flatten to the same identifier through it. New diagnostic
KOIN-D008hard-errors on thatspecific collision when it happens within one compilation (e.g. two zero-parameter keep-alive hints
sharing a signature, a real KLIB
SignatureClashDetectorfailure mode) — there is no legitimatescenario where two distinct modules should collide, so there's no opt-out. Detecting the same
collision across Gradle modules is a known, explicitly deferred gap (would need to run at the
entry-point aggregator over already-decoded ids) — documented, not silent.
✅ Compatibility
CLAUDE.mdfor the version-gate policy)📦 Install
plugins { id("io.insert-koin.compiler.plugin") version "1.1.0" }Full changelog: InsertKoinIO/koin-compiler-plugin@1.0.2...1.1.0
v1.0.2Compare 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
@Modulewhose dependency is provided by a sibling module (assembled only at@KoinApplication/startKoin) no longer fails withKOIN-D001. It defers to the entry-point graph, and surfaces a newKOIN-W002warning only when no complete closure is visible in the compilation (#51).@ComponentScanand cross-module top-level@Singlefunctions no longer emit duplicate hint declarations that broke KLIB serialization (#62).parametersOfhelpers, and outer DSL qualifiers are now understood (#36, #49, #61, #41).KoinApplication(configuration = koinConfiguration { … })now runs full-graph safety (#38).🐛 Fixes
False
KOIN-D001for cross-module (sibling) dependencies — #51 (KTZ-4256)In a layered multi-module build, a
@Moduleis 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 hardKOIN-D001missing 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 runtimecheckModules(). When no complete closure is present in the compilation (e.g. a leaf library module), it emits the newKOIN-W002warning instead of an error.Duplicate hint declarations broke iOS / Native / WASM-JS — #62 (KTZ-4365)
A cross-module
@ComponentScancovering a dependency module's package, and cross-module top-level@Singlefunctions, could register the same definition more than once — emitting duplicatecomponentscan_*/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 hardSignatureClashDetectorerror. Definitions are now de-duplicated by class identity (and by type+qualifier for functions), so each is emitted exactly once per target.False
KOIN-D001for typed DSL definitions with non-createlambdas — #36, #49single<T> { existingInstance },single<T> { provideX() },viewModel { VM() }and similar shapes are now recognized as providingT, so compile-safety no longer reportsTas a missing definition. The user's lambda is left untouched.False
KOIN-D006for indirectparametersOfhelpers — #61A call site passing an opaque params lambda (e.g.
{ buildParams() }) no longer triggersKOIN-D006("forgotparametersOf"). The diagnostic now fires only when no params lambda is present at all.Qualifier lost on DSL
createdefinitions — #41An 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 — #38KoinApplication(configuration = koinConfiguration { modules(…) })is now recognized as a Koin entry point, enabling full-graph (A3) compile-safety for Compose apps. ThekoinConfigurationcall 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
@PropertyValueregistry 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@PropertyValuedefault dropped. State is now held per-compilation (thread-local, rebound onto the IR phase), matching the existing per-compilation message-collector handling.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, andandroidx.lifecycle.ViewModel/AndroidViewModel. Previously a@KoinViewModel/@Singleclass implementing one of these could be auto-bound to the framework base type, lettingget<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 withbinds = [...].✅ Compatibility
📦 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.1Compare 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
@Single(createdAtStart = true)honored on definition functions — eager singletons are created atstartKoinagain.🐛 Fixes
Kotlin version compatibility — #19, #42 (and koin#2431)
The plugin hard-crashed on the two most recent Kotlin versions:
ClassCastExceptionduring FIR extension registration.NoSuchMethodError(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, #40A type collected by more than one
@ComponentScanmodule generated the@InjectedParamhint 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#2415createdAtStart = trueon a@Single/@Singletondefinition function inside a@Modulewas discarded in codegen, so eager singletons were never created atstartKoin(no error or warning). Now propagated correctly. (The@Module(createdAtStart)and@Singleton classcases were already fixed in 1.0.0-RC3.13.)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
📦 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.0Compare 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)
A → B → Aare caught during graph traversal in A2/A3, no longer waiting for runtime.get<T> { parametersOf(...) }and ViewModel/inject sites withparametersOf {}flows are validated against the assembled graph.koinViewModel<T>()inside@Composablebuilders is validated like any other call site.(raw class + qualifier)key, preventing silent last-wins overrides at runtime.KOIN-D007—@Factoryreturning a type that extends a suspendfun interfaceis now blocked at compile time (previously crashed Fir2Ir).koinConfiguration/koinApplication/startKoinno longer bypass A3 — the full-graph pass runs even without an explicit<T>type parameter.startKoin<T>()— A4 now sees DSLmodule { … }definitions declared in dependency JARs when the aggregator uses the typed entry point.Incremental compilation & build robustness
strictSafetyflag — auto-enabled on modules that containstartKoin,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 insidemodule { }lambda bodies (not part of any declaration's ABI) and@ComponentScanpackage-scope discovery (no source-level edge). Library and feature modules stay fully incremental.Hints.ktcollisions during multi-platform builds.KtPsiSourceElement.psiprevents Fir2Ir crashes when the plugin runs alongside kapt or Hilt during migration.Kotlin 2.3.20 compatibility
HINTS_PACKAGEis 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 generatedmodule { }.@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
Performance
startKoinmodule discovery — repeated scans during a single compilation reuse the resolved module set.@ComponentScanfiltering — package-scope discovery now uses an indexed lookup instead of repeated linear scans, noticeably faster on large multi-module projects.Repo / docs
playground-apps/app-dsl,playground-apps/app-annotations) — single clone, single build, no separate repo to keep in sync.strictSafety, K2.3.20 minimum, circular-dep detection at compile time, KOIN-D007.Behaviour changes to note when upgrading
strictSafetyis on by default on aggregator modules. If your app containsstartKoin,koinApplication, or@KoinApplication, that module'scompileKotlintask 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. SetkoinCompiler { 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-RC2until you can upgrade.Closed issues since the project went public
Fixed
@ScopeId(@limuyang2)@Providedstill flagging missing dependencies (@kmbisset89)Scope.get()(@alex28sh).module()extension not recognized by IntelliJ (@DenAbr)@Factoryreturningfun interfaceextending suspend function type (@krzdabrowski) — now also blocked diagnostically via KOIN-D007@Single(binds = [...])provider function (@flaringapp)compileSafetymissing binding silently passes on incremental compilation (@j-bajon) — drove thestrictSafetydesign@Scope(name=…)+@Scoped(binds=[…])silently produce no bean definitions (@rduriancik)org.koin.plugin.hints(@0xMatthewGroves)compileSafetychecks bypassed when usingKoinApplicationComposable in CMP (@rajdeepvaghela)Won't fix / deferred
module()extension (@JordanLongstaff) — documented as a known limitation pending IDE-side supportCross-repo fixes
@ScopeId(name = "…")resolution behaviourstartKoin<T>+@KoinApplication(modules=[…])+ scanned@KoinViewModelincludes(...)reachability@KoinApplication(modules = [...])overrides discovered@ConfigurationContributors
Project lead: @arnaudgiuliani (Arnaud Giuliani)
Code contributions (commit authors and merged PRs across all releases):
@Moduleprovider functions (PR #23)@ComponentScanhints without@Configuration(PR #25)Credits for techniques:
LookupTrackerandExpectActualTrackerpatterns from MetroIssue 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)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.