Remove --add-opens options to workaround Java 9 visibility checks

These options are no longer needed because the problematic code in
intellij-core that was accessing these private APIs has been dealt with
in the 171 branch.

The remaining options in "Codegen Tests" run configurations are needed
because of reflection usage on JDK internals in KtUsefulTestCase
This commit is contained in:
Alexander Udalov
2017-06-26 17:23:02 +03:00
parent 40d4eeab4f
commit 5b9ee88b52
6 changed files with 3 additions and 25 deletions
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.daemon.common.*
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents
import org.jetbrains.kotlin.progress.CompilationCanceledStatus
import java.io.File
import java.io.IOException
import java.io.OutputStream
import java.io.PrintStream
import java.net.SocketException
@@ -48,15 +47,6 @@ object KotlinCompilerClient {
val verboseReporting = System.getProperty(COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY) != null
val java9RestrictionsWorkaroundOptions =
if (System.getProperty("java.specification.version") == "9") listOf(
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.util.concurrent.atomic=ALL-UNNAMED",
"--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED"
)
else emptyList()
fun getOrCreateClientFlagFile(daemonOptions: DaemonOptions): File =
// for jps property is passed from IDEA to JPS in KotlinBuildProcessParametersProvider
System.getProperty(COMPILE_DAEMON_CLIENT_ALIVE_PATH_PROPERTY)
@@ -372,7 +362,6 @@ object KotlinCompilerClient {
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
platformSpecificOptions +
daemonJVMOptions.mappers.flatMap { it.toArgs("-") } +
java9RestrictionsWorkaroundOptions +
COMPILER_DAEMON_CLASS_FQN +
daemonOptions.mappers.flatMap { it.toArgs(COMPILE_DAEMON_CMDLINE_OPTIONS_PREFIX) } +
compilerId.mappers.flatMap { it.toArgs(COMPILE_DAEMON_CMDLINE_OPTIONS_PREFIX) }