Add minimal roots deduplication on classpath update

duplication was detected e.g. in some scripting scenarios
This commit is contained in:
Ilya Chernikov
2022-10-07 14:24:27 +02:00
committed by Space Team
parent b50a803b6f
commit 8566589cf5
@@ -350,7 +350,7 @@ class KotlinCoreEnvironment private constructor(
fun updateClasspath(contentRoots: List<ContentRoot>): List<File>? {
// TODO: add new Java modules to CliJavaModuleResolver
val newRoots = classpathRootsResolver.convertClasspathRoots(contentRoots).roots
val newRoots = classpathRootsResolver.convertClasspathRoots(contentRoots).roots - initialRoots
if (packagePartProviders.isEmpty()) {
initialRoots.addAll(newRoots)