5/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753 Meaningful semantic change was splitted into 5 commits to simplify the change review. Sinle commit would be too big. Why replace source to binary: to get rid of kotlin-reflect in Kotlin plugin artifact KTIJ-22276 Tests that would break if we put reflect from the minimum supported IDEA into dist: * Java11ModulesIntegrationTest * Java17ModulesIntegrationTest ^ Actually, a lot of tests would fail, but I specifically highlight those two because the "a lot of tests" can be easily fixed by changing `ForTestCompileRuntime.reflectJarForTests` to: ``` @NotNull public static File reflectJarForTests() { return assertExists(new File("libraries/reflect/build/libs/kotlin-reflect-1.7.255-SNAPSHOT.jar")); } ``` `Java11ModulesIntegrationTest` & `Java11ModulesIntegrationTest` cannot be fixed in principle because those tests use reflect from dist with help of `JvmArgumentsKt.configureStandardLibs` (not with help of `ForTestCompileRuntime`). `JvmArgumentsKt.configureStandardLibs` is about `-no-stdlib` & `-no-reflect` compiler flags. That's why we have to pack SNAPSHOT reflect into dist.
This commit is contained in:
@@ -89,6 +89,9 @@ val distLibraryProjects = listOfNotNull(
|
||||
":kotlin-imports-dumper-compiler-plugin",
|
||||
":kotlin-main-kts",
|
||||
":kotlin-preloader",
|
||||
// Although, Kotlin compiler is compiled against reflect of an older version (which is bundled into minimal supported IDEA). We put
|
||||
// SNAPSHOT reflect into the dist because we use reflect dist in user code compile classpath (see JvmArgumentsKt.configureStandardLibs).
|
||||
// We can use reflect of a bigger version in Kotlin compiler runtime, because kotlin-reflect follows backwards binary compatibility
|
||||
":kotlin-reflect",
|
||||
":kotlin-runner",
|
||||
":kotlin-script-runtime",
|
||||
|
||||
Reference in New Issue
Block a user