[JS Test] Include friend modules in list of all dependencies in compiler configuration
This commit is contained in:
committed by
Space Team
parent
83cbd322fd
commit
e88a6af7a0
+1
-1
@@ -299,7 +299,7 @@ class ClassicFrontendFacade(
|
|||||||
val runtimeKlibs = loadKlib(runtimeKlibsNames, configuration)
|
val runtimeKlibs = loadKlib(runtimeKlibsNames, configuration)
|
||||||
val transitiveLibraries = JsEnvironmentConfigurator.getDependencies(module, testServices, DependencyRelation.RegularDependency)
|
val transitiveLibraries = JsEnvironmentConfigurator.getDependencies(module, testServices, DependencyRelation.RegularDependency)
|
||||||
val friendLibraries = JsEnvironmentConfigurator.getDependencies(module, testServices, DependencyRelation.FriendDependency)
|
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 analyzer = AnalyzerWithCompilerReport(configuration)
|
||||||
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
|
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
|
||||||
|
|||||||
+2
-2
@@ -264,8 +264,8 @@ class JsEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigu
|
|||||||
|
|
||||||
val libraries = when (module.targetBackend) {
|
val libraries = when (module.targetBackend) {
|
||||||
null -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST
|
null -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST
|
||||||
TargetBackend.JS_IR -> dependencies
|
TargetBackend.JS_IR -> dependencies + friends
|
||||||
TargetBackend.JS -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST + dependencies
|
TargetBackend.JS -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST + dependencies + friends
|
||||||
else -> error("Unsupported target backend: ${module.targetBackend}")
|
else -> error("Unsupported target backend: ${module.targetBackend}")
|
||||||
}
|
}
|
||||||
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)
|
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)
|
||||||
|
|||||||
Reference in New Issue
Block a user