Repository navigation
fix: warn when the startKoin module has no DSL definition — DSL graph not validated - #135
Merged
Merged
Conversation
… not validated
DSL graph validation only runs when the module calling startKoin { } has at
least one DSL definition of its own. An entry point that only loads other
modules got no validation and no message: a missing dependency compiled
clean. Now logs a warning (same severity setting as the other informational
output). No validation change.
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.
Problem
DSL graph validation (Phase 3.1) only runs when the module calling
startKoin { }has at least one DSL definition of its own (KoinIrExtension.kt,dslDefinitions.isNotEmpty()). An app whosestartKoinonly loads feature modules gets no validation and no message: a missing dependency compiles clean. Behavior since 0.4.0-beta20.Fix
Log a warning in that case:
[Koin] compile-safety: DSL graph not validated — no DSL definition in this entry-point module.Same
warn()as the existing "no Koin entry point" disclosure, so it followslogSeverity(#73). No validation change.Behavior change
New informational warning only.
Proof
:lib→:mid→:app(startKoin, no local def),single<Repo>()removed, jvm + iosArm64 + wasmJssingle<AppThing>()in:appKOIN-D001KOIN-D001, no warning