Skip to content

Commit 3c511f3

Browse files
committed
KSCM: temporary workaround gradle returning results in unstable order
1 parent fb0e0e3 commit 3c511f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

idea/idea-core/src/org/jetbrains/kotlin/idea/core/script/KotlinScriptConfigurationManager.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ private class ClearableLazyValue<out T : Any>(private val lock: ReentrantReadWri
287287
}
288288
}
289289

290+
// TODO: relying on this to compare dependencies seems wrong, doesn't take javaHome and other stuff into account
290291
private fun KotlinScriptExternalDependencies.match(other: KotlinScriptExternalDependencies)
291-
= classpath.isSamePathListAs(other.classpath) && sources.isSamePathListAs(other.sources)
292+
= classpath.isSamePathListAs(other.classpath) &&
293+
sources.toSet().isSamePathListAs(other.sources.toSet()) // TODO: gradle returns stdlib and reflect sources in unstable order for some reason
292294

293295

294296
private fun Iterable<File>.isSamePathListAs(other: Iterable<File>): Boolean =

0 commit comments

Comments
 (0)