K2: do not run compilation if Java module graph setup failed

#KT-61156 Fixed
This commit is contained in:
Alexander Udalov
2023-08-11 01:20:32 +02:00
committed by Space Team
parent 4e706ba93e
commit bddc18e463
2 changed files with 2 additions and 2 deletions
@@ -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