From 4fe3e875faa5ee29843682d4c53bfbabf8347356 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Wed, 24 May 2023 09:30:49 +0200 Subject: [PATCH] Write refined classpath back to compiler config in core env - fixes refining with classpath updates --- .../jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt index ceb03947a7b..f364691446a 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt @@ -364,6 +364,8 @@ class KotlinCoreEnvironment private constructor( } } + configuration.addAll(CLIConfigurationKeys.CONTENT_ROOTS, contentRoots - configuration.getList(CLIConfigurationKeys.CONTENT_ROOTS)) + return rootsIndex.addNewIndexForRoots(newRoots)?.let { newIndex -> updateClasspathFromRootsIndex(newIndex) newIndex.indexedRoots.mapNotNull { (file) ->