K2: do not run compilation if Java module graph setup failed
#KT-61156 Fixed
This commit is contained in:
committed by
Space Team
parent
4e706ba93e
commit
bddc18e463
@@ -145,6 +145,7 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR) && configuration.getBoolean(CommonConfigurationKeys.USE_LIGHT_TREE)) {
|
||||
val projectEnvironment =
|
||||
createProjectEnvironment(configuration, rootDisposable, EnvironmentConfigFiles.JVM_CONFIG_FILES, messageCollector)
|
||||
if (messageCollector.hasErrors()) return COMPILATION_ERROR
|
||||
|
||||
compileModulesUsingFrontendIrAndLightTree(
|
||||
projectEnvironment, configuration, messageCollector, buildFile, chunk, targetDescription
|
||||
|
||||
+1
-2
@@ -165,8 +165,7 @@ abstract class AbstractJavaModulesIntegrationTest(
|
||||
module("moduleB", listOf(module("moduleA")), addModules = emptyList())
|
||||
}
|
||||
|
||||
// TODO (KT-61156): do not try to run compilation if there were errors during calculation of Java module graph.
|
||||
fun testReleaseFlagWrongValue() = muteForK2 {
|
||||
fun testReleaseFlagWrongValue() {
|
||||
module("module5", additionalKotlinArguments = listOf("-Xjdk-release=5"), checkKotlinOutput = { output ->
|
||||
assertTrue(output, "error: unknown JDK release version: 5" in output)
|
||||
assertTrue(output, "error: unknown JVM target version: 5" in output)
|
||||
|
||||
Reference in New Issue
Block a user