[JS Test] Include friend modules in list of all dependencies in compiler configuration

This commit is contained in:
Dmitriy Novozhilov
2023-01-11 14:50:36 +02:00
committed by Space Team
parent 83cbd322fd
commit e88a6af7a0
2 changed files with 3 additions and 3 deletions
@@ -299,7 +299,7 @@ class ClassicFrontendFacade(
val runtimeKlibs = loadKlib(runtimeKlibsNames, configuration)
val transitiveLibraries = JsEnvironmentConfigurator.getDependencies(module, testServices, DependencyRelation.RegularDependency)
val friendLibraries = JsEnvironmentConfigurator.getDependencies(module, testServices, DependencyRelation.FriendDependency)
val allDependencies = runtimeKlibs + dependencyDescriptors + friendsDescriptors + transitiveLibraries
val allDependencies = runtimeKlibs + dependencyDescriptors + friendLibraries + friendsDescriptors + transitiveLibraries
val analyzer = AnalyzerWithCompilerReport(configuration)
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
@@ -264,8 +264,8 @@ class JsEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigu
val libraries = when (module.targetBackend) {
null -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST
TargetBackend.JS_IR -> dependencies
TargetBackend.JS -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST + dependencies
TargetBackend.JS_IR -> dependencies + friends
TargetBackend.JS -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST + dependencies + friends
else -> error("Unsupported target backend: ${module.targetBackend}")
}
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)