Move CompilerEnvironment from 'frontend' to 'cli'
This is needed in order to have a single convenient place where to register frontend services implemented _outside_ of the 'frontend' module, such as the control flow analysis, extracted to a separate module in a subsequent commit.
This commit is contained in:
committed by
Alexander Udalov
parent
3efbca85ea
commit
ca5a35b4b3
+7
-5
@@ -38,6 +38,7 @@ import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.platform.CommonPlatforms
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.resolve.CompilerEnvironment
|
||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils.newConfiguration
|
||||
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase
|
||||
@@ -320,12 +321,13 @@ private class AnalyzedModules(
|
||||
.toList()
|
||||
|
||||
val module = CommonResolverForModuleFactory.analyzeFiles(
|
||||
files = psiFiles,
|
||||
moduleName = Name.special("<$moduleName>"),
|
||||
psiFiles,
|
||||
Name.special("<$moduleName>"),
|
||||
dependOnBuiltIns = true,
|
||||
languageVersionSettings = environment.configuration.languageVersionSettings,
|
||||
targetPlatform = CommonPlatforms.defaultCommonPlatform,
|
||||
dependenciesContainer = DependenciesContainerImpl(sharedTarget, currentTarget, dependencies)
|
||||
environment.configuration.languageVersionSettings,
|
||||
CommonPlatforms.defaultCommonPlatform,
|
||||
CompilerEnvironment,
|
||||
dependenciesContainer = DependenciesContainerImpl(sharedTarget, currentTarget, dependencies),
|
||||
) { content ->
|
||||
environment.createPackagePartProvider(content.moduleContentScope)
|
||||
}.moduleDescriptor
|
||||
|
||||
Reference in New Issue
Block a user