From e88a6af7a0805145bbb140d2606f3b5ca4a30533 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 11 Jan 2023 14:50:36 +0200 Subject: [PATCH] [JS Test] Include friend modules in list of all dependencies in compiler configuration --- .../kotlin/test/frontend/classic/ClassicFrontendFacade.kt | 2 +- .../test/services/configuration/JsEnvironmentConfigurator.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontendFacade.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontendFacade.kt index 07720758dd6..9af0954b290 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontendFacade.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontendFacade.kt @@ -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 diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt index d0e0a83cf1a..caa75085d0a 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt @@ -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)