Skip to content

Commit

Permalink
Bind generating tag files to KOIN_CONFIG_CHECK parameter.
Browse files Browse the repository at this point in the history
Fixes InsertKoinIOgh-185 & InsertKoinIOgh-167 when KOIN_CONFIG_CHECK is false.
  • Loading branch information
Sepehr1812 committed Jan 8, 2025
1 parent 58135d9 commit 5db6b12
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BuilderProcessor(
private val isComposeViewModelActive = isComposeViewModelActive() || isKoinComposeViewModelActive()
private val koinCodeGenerator = KoinCodeGenerator(codeGenerator, logger, isComposeViewModelActive)
private val koinMetaDataScanner = KoinMetaDataScanner(logger)
private val koinTagWriter = KoinTagWriter(codeGenerator,logger)
private val koinTagWriter = KoinTagWriter(codeGenerator, logger)
private val koinConfigChecker = KoinConfigChecker(codeGenerator, logger)

override fun process(resolver: Resolver): List<KSAnnotated> {
Expand All @@ -59,11 +59,13 @@ class BuilderProcessor(
logger.logging("Generate code ...")
koinCodeGenerator.generateModules(moduleList, defaultModule, isDefaultModuleActive())

val allModules = moduleList + defaultModule
koinTagWriter.writeAllTags(moduleList, defaultModule)

if (isConfigCheckActive()) {
logger.warn("Check Configuration ...")

val allModules = moduleList + defaultModule
koinTagWriter.writeAllTags(moduleList, defaultModule)

koinConfigChecker.verifyDefinitionDeclarations(allModules, resolver)
koinConfigChecker.verifyModuleIncludes(allModules, resolver)
}
Expand Down

0 comments on commit 5db6b12

Please sign in to comment.