[LL API] Adjust services required by LLFirBuiltinsSessionFactory
As 'initialiseVirtualFileFinderServices()' that is run during test initialization collects transitive dependencies, all of them must be ready. However, 'KtNotUnderContentRootModuleForTest' has a built-in dependency provided by 'LLFirBuiltinsSessionFactory'.
This commit is contained in:
+2
-1
@@ -30,8 +30,9 @@ class ProjectStructureInitialisationPreAnalysisHandler(
|
||||
configurator.registerApplicationServices(application, testServices)
|
||||
createAndRegisterKtModules(moduleStructure, project)
|
||||
configurator.registerProjectExtensionPoints(project, testServices)
|
||||
testServices.environmentManager.initializeProjectStructure()
|
||||
configurator.registerProjectServices(project, testServices)
|
||||
testServices.environmentManager.initializeProjectStructure()
|
||||
configurator.registerProjectModelServices(project, testServices)
|
||||
}
|
||||
|
||||
private fun createAndRegisterKtModules(moduleStructure: TestModuleStructure, project: MockProject) {
|
||||
|
||||
+4
@@ -57,6 +57,10 @@ abstract class AnalysisApiTestConfigurator {
|
||||
serviceRegistrars.forEach { it.registerProjectServices(project, testServices) }
|
||||
}
|
||||
|
||||
fun registerProjectModelServices(project: MockProject, testServices: TestServices) {
|
||||
serviceRegistrars.forEach { it.registerProjectModelServices(project, testServices) }
|
||||
}
|
||||
|
||||
fun registerApplicationServices(application: MockApplication, testServices: TestServices) {
|
||||
ApplicationServiceRegistrar.register(application, serviceRegistrars, testServices)
|
||||
}
|
||||
|
||||
+3
-1
@@ -10,9 +10,11 @@ import com.intellij.mock.MockProject
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class AnalysisApiTestServiceRegistrar {
|
||||
abstract fun registerApplicationServices(application: MockApplication, testServices: TestServices)
|
||||
|
||||
abstract fun registerProjectExtensionPoints(project: MockProject, testServices: TestServices)
|
||||
|
||||
abstract fun registerProjectServices(project: MockProject, testServices: TestServices)
|
||||
|
||||
abstract fun registerApplicationServices(application: MockApplication, testServices: TestServices)
|
||||
abstract fun registerProjectModelServices(project: MockProject, testServices: TestServices)
|
||||
}
|
||||
Reference in New Issue
Block a user