Pass CompilerConfiguration to TopDownAnalyzerFacadeForJVM
In most cases, the configuration can be loaded from KotlinCoreEnvironment. In other cases, such as IDE tests, there's no environment, so we pass EMPTY. Since currently the configuration is only used to load incremental compilation components and module information, it's fine to pass EMPTY
This commit is contained in:
+5
-5
@@ -323,16 +323,16 @@ object KotlinToJVMBytecodeCompiler {
|
||||
environment.getSourceFiles(), object : AnalyzerWithCompilerReport.Analyzer {
|
||||
override fun analyze(): AnalysisResult {
|
||||
val sharedTrace = CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace()
|
||||
val moduleContext = TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project,
|
||||
environment.getModuleName())
|
||||
val moduleContext =
|
||||
TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project, environment.getModuleName())
|
||||
|
||||
return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(
|
||||
moduleContext,
|
||||
environment.getSourceFiles(),
|
||||
sharedTrace,
|
||||
environment.configuration.get(JVMConfigurationKeys.MODULES),
|
||||
environment.configuration.get(JVMConfigurationKeys.INCREMENTAL_COMPILATION_COMPONENTS),
|
||||
JvmPackagePartProvider(environment))
|
||||
environment.configuration,
|
||||
JvmPackagePartProvider(environment)
|
||||
)
|
||||
}
|
||||
|
||||
override fun reportEnvironmentErrors() {
|
||||
|
||||
Reference in New Issue
Block a user