[CLI] Restore K2JVMCompilerArguments.classpath and javaModulePath
to support IDEs < 2023.2 Reverts: -9dcd40d7b7-fb66764c4dKTIJ-25227
This commit is contained in:
committed by
Space Team
parent
7fe3c5c423
commit
5d0bf2de24
@@ -181,7 +181,7 @@ class KotlinFacetSettings {
|
||||
if (compilerSettings != null) {
|
||||
parseCommandLineArguments(compilerSettings.additionalArgumentsAsList, this)
|
||||
}
|
||||
if (this is K2JVMCompilerArguments) this.classpath = null
|
||||
if (this is K2JVMCompilerArguments) this.classpath = ""
|
||||
}
|
||||
} else null
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ fun CommonCompilerArguments.convertPathsToSystemIndependent() {
|
||||
when (this) {
|
||||
is K2JVMCompilerArguments -> {
|
||||
destination = destination?.let(FileUtilRt::toSystemIndependentName)
|
||||
classpath?.forEachIndexed { index, s -> classpath!![index] = FileUtilRt.toSystemIndependentName(s) }
|
||||
classpath = classpath?.let(FileUtilRt::toSystemIndependentName)
|
||||
jdkHome = jdkHome?.let(FileUtilRt::toSystemIndependentName)
|
||||
kotlinHome = kotlinHome?.let(FileUtilRt::toSystemIndependentName)
|
||||
friendPaths?.forEachIndexed { index, s -> friendPaths!![index] = FileUtilRt.toSystemIndependentName(s) }
|
||||
|
||||
@@ -34,7 +34,7 @@ class CompilerArgumentsSerializationTest {
|
||||
@Test
|
||||
fun testLongClasspathArgumentJVM() {
|
||||
doSerializeDeserializeAndCompareTest<K2JVMCompilerArguments> {
|
||||
classpath = generateSequence { generateRandomString(50) }.take(10).toList().toTypedArray()
|
||||
classpath = generateSequence { generateRandomString(50) }.take(10).toList().joinToString(File.pathSeparator)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,4 +184,4 @@ class CompilerArgumentsSerializationTest {
|
||||
.map(charPool::get)
|
||||
.joinToString("")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.testFramework.LightVirtualFile
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import com.intellij.util.io.Decompressor
|
||||
import com.intellij.util.io.URLUtil
|
||||
import com.intellij.util.io.ZipUtil
|
||||
import org.jetbrains.jps.ModuleChunk
|
||||
@@ -958,7 +957,7 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
|
||||
Files.copy(libraryJar.toPath(), module1Lib.toPath(), StandardCopyOption.REPLACE_EXISTING)
|
||||
|
||||
assert(module1Lib.exists())
|
||||
(facet.compilerArguments as K2JVMCompilerArguments).classpath = arrayOf(module1Lib.path)
|
||||
(facet.compilerArguments as K2JVMCompilerArguments).classpath = module1Lib.path
|
||||
|
||||
it.container.setChild(
|
||||
JpsKotlinFacetModuleExtension.KIND,
|
||||
|
||||
Reference in New Issue
Block a user