You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
strictSafety: incremental compilation skips the full-graph check when the module list changes in a file other than the entry point #117
With strictSafety auto-enabled on the aggregator module, the aggregator's compile task re-runs as documented. But Kotlin incremental compilation recompiles only the dirty files. If the change is to a module-list function in a different file from the startKoin call, the entry-point file isn't part of the compilation round, and the full-graph check doesn't run. The build passes even though a module was dropped from startKoin.
Delete networkModule from appKoinModules() in AppKoinModules.kt, the only file edited.
./gradlew :app:compileDebugKotlin: BUILD SUCCESSFUL, no Koin diagnostics.
./gradlew :app:compileDebugKotlin --rerun -Pkotlin.incremental=false: fails with hundreds of KOIN-D001s (545 in our app), as expected.
The signature of appKoinModules() doesn't change, so IC has no reason to recompile App.kt, and the compilation round that runs has no entry point in it.
Expected
When strictSafety is active for a module, the full-graph pass should see the entry points even on an incremental round. Two possible ways:
Make the compile task non-incremental for aggregator modules.
Record the entry-point files and mark them dirty whenever a file contributing to the module graph changes (for example, through the lookup tracker).
Confirmed: strictSafety alone doesn't cover this. IC recompiles only the edited file, so the entry point isn't in that compilation round. Planned for 1.3.0. Until then, a non-incremental build (clean, or -Pkotlin.incremental=false) catches it, so run it that way on CI.
Activity
arnaudgiuliani commentedon Nov 3, 2026
Confirmed: strictSafety alone doesn't cover this. IC recompiles only the edited file, so the entry point isn't in that compilation round. Planned for 1.3.0. Until then, a non-incremental build (clean, or
-Pkotlin.incremental=false) catches it, so run it that way on CI.Thanks @shreknitin89 for the precise analysis 🙏
feat: an explicit strictSafety = false is honored (#120)
docs: 1.2.2 release notes thanks every reporter, #117 moves to 1.3.0