Skip to content

Report missing ComponentScan coverage for top-level providers#63

Open
flaringapp wants to merge 2 commits into
InsertKoinIO:mainfrom
flaringapp:flaringapp/bug-62-top-level-function-definitions
Open

Report missing ComponentScan coverage for top-level providers#63
flaringapp wants to merge 2 commits into
InsertKoinIO:mainfrom
flaringapp:flaringapp/bug-62-top-level-function-definitions

Conversation

@flaringapp

Copy link
Copy Markdown

Summary

Fixes issue #62 by reporting a compile-time error when a local top-level annotated provider function is not covered by any loaded @ComponentScan module and would be missing from the runtime Koin graph.

This also treats core org.koin.dsl.koinApplication as a Koin entrypoint for this diagnostic, matching the existing startKoin behavior and repo test usage.

Verification

./test.sh
./test.sh --tests 'org.jetbrains.kotlin.compiler.plugin.template.runners.JvmErrorMessageTestGenerated'
./test.sh --tests 'org.jetbrains.kotlin.compiler.plugin.template.runners.JvmDiagnosticTestGenerated'
./test.sh --tests 'org.jetbrains.kotlin.compiler.plugin.template.runners.JvmBoxTestGenerated$Toplevel'

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.

1 participant