Do not add JS/JVM libraries to common library dependencies in LibraryDependenciesCache

Currently kotlin-stdlib-common doesn't have serialized built-ins inside,
so in a multiplatform project, it was possible that either JVM or JS
built-ins (depending on the order of entries in the project
configuration) were going to be used for the analysis of a common module
depending on kotlin-stdlib-common. This resulted, for example, in
additional built-in member calls (e.g. "List.stream()") being unresolved
in JVM modules when they used the List instance coming from the common
module (see the added test)
This commit is contained in:
Alexander Udalov
2017-04-14 15:27:53 +03:00
parent 4c2c734733
commit 9a8dc14616
10 changed files with 114 additions and 20 deletions
@@ -66,6 +66,11 @@ public class ForTestCompileRuntime {
return assertExists(new File("dist/common/kotlin-stdlib-common.jar"));
}
@NotNull
public static File stdlibJsForTests() {
return assertExists(new File("dist/kotlinc/lib/kotlin-stdlib-js.jar"));
}
// TODO: Do not use these classes, remove them after stdlib tests are merged in the same build as the compiler
@NotNull
@Deprecated