Use copied key to extract default jdkHome from host configuration

This commit is contained in:
Ilya Chernikov
2020-05-13 21:36:07 +02:00
parent 20bbcd5d5a
commit 255ad47406
3 changed files with 8 additions and 3 deletions
@@ -213,7 +213,8 @@ private fun createInitialCompilerConfiguration(
// Default value differs from the argument's default (see #KT-29405 and #KT-29319)
put(JVMConfigurationKeys.JVM_TARGET, JvmTarget.JVM_1_8)
val jdkHomeFromConfigurations = scriptCompilationConfiguration.getNoDefault(ScriptCompilationConfiguration.jvm.jdkHome)
val jdkHomeFromConfigurations = scriptCompilationConfiguration[ScriptCompilationConfiguration.jvm.jdkHome]
// TODO: check if this is redundant and/or incorrect since the default is now taken from the host configuration anyway (the one linked to the compilation config)
?: hostConfiguration[ScriptingHostConfiguration.jvm.jdkHome]
if (jdkHomeFromConfigurations != null) {
messageCollector.report(CompilerMessageSeverity.LOGGING, "Using JDK home directory $jdkHomeFromConfigurations")