diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtCodeFragmentModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtCodeFragmentModuleFactory.kt index 12ffb8dfc38..785b807c0c0 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtCodeFragmentModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtCodeFragmentModuleFactory.kt @@ -29,9 +29,9 @@ object KtCodeFragmentModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection ): KtModuleWithFiles { requireNotNull(contextModule) { "Code fragment requires a context module" } diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibraryBinaryModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibraryBinaryModuleFactory.kt index 2a30088911c..af1846121be 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibraryBinaryModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibraryBinaryModuleFactory.kt @@ -22,9 +22,9 @@ object KtLibraryBinaryModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { val library = testServices.compiledLibraryProvider.compileToLibrary(testModule, dependencyPaths).artifact val decompiledFiles = testServices.testModuleDecompiler.getAllPsiFilesFromLibrary(library, project) diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibrarySourceModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibrarySourceModuleFactory.kt index db2a1864e2c..5fcf7ef6fc3 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibrarySourceModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtLibrarySourceModuleFactory.kt @@ -25,9 +25,9 @@ object KtLibrarySourceModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { Assume.assumeFalse("Compilation of multi-platform libraries is not supported", testModule.targetPlatform.isMultiPlatform()) diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtModuleFactory.kt index 78af0b2aaa7..110ebb5fed3 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtModuleFactory.kt @@ -21,13 +21,15 @@ fun interface KtModuleFactory : TestService { * @param contextModule a module to use as a context module. Some kinds of modules (such as dangling file modules) require a * context module. Modules representing code fragments also require a context element – that is why the [KtModuleWithFiles] is passed, * instead of a plain (KtModule)[org.jetbrains.kotlin.analysis.project.structure.KtModule]. + * + * @param dependencyPaths Paths of directories containing dependency libraries. The paths will be set as class paths for compilation. */ fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles } diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtScriptModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtScriptModuleFactory.kt index 0c840e1dee5..70a9dc27b40 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtScriptModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtScriptModuleFactory.kt @@ -19,9 +19,9 @@ object KtScriptModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { val ktFile = TestModuleStructureFactory.createSourcePsiFiles(testModule, testServices, project).single() as KtFile val module = KtScriptModuleImpl( diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtSourceModuleFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtSourceModuleFactory.kt index bd77a714e99..61dbd983428 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtSourceModuleFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/KtSourceModuleFactory.kt @@ -19,9 +19,9 @@ object KtSourceModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { val psiFiles = TestModuleStructureFactory.createSourcePsiFiles(testModule, testServices, project) diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/TestModuleStructureFactory.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/TestModuleStructureFactory.kt index 5c855727a0f..118004cac1d 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/TestModuleStructureFactory.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/project/structure/TestModuleStructureFactory.kt @@ -112,10 +112,10 @@ object TestModuleStructureFactory { val contextModuleName = testModule.directives.singleOrZeroValue(AnalysisApiTestDirectives.CONTEXT_MODULE) val contextModule = contextModuleName?.let(existingModules::getValue) - val dependencies = testModule.regularDependencies.mapNotNull { moduleNamesToPaths[it.moduleName] }.flatten() + val dependencyPaths = testModule.regularDependencies.mapNotNull { moduleNamesToPaths[it.moduleName] }.flatten() val moduleWithFiles = testServices .getKtModuleFactoryForTestModule(testModule) - .createModule(testModule, contextModule, testServices, project, dependencies) + .createModule(testModule, contextModule, dependencyPaths, testServices, project) existingModules[testModule.name] = moduleWithFiles result.add(moduleWithFiles) diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirOutOfContentRootTestConfigurator.kt b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirOutOfContentRootTestConfigurator.kt index 65cc0d3f8e7..9578bf4c63b 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirOutOfContentRootTestConfigurator.kt +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirOutOfContentRootTestConfigurator.kt @@ -67,9 +67,9 @@ private object KtOutOfContentRootModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { val psiFiles = TestModuleStructureFactory.createSourcePsiFiles(testModule, testServices, project) val platform = testModule.targetPlatform diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirStdlibSourceTestConfigurator.kt b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirStdlibSourceTestConfigurator.kt index b4d24b8d2a1..e1f0c523f38 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirStdlibSourceTestConfigurator.kt +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/test/configurators/AnalysisApiFirStdlibSourceTestConfigurator.kt @@ -29,9 +29,9 @@ private object KtStdlibSourceModuleFactory : KtModuleFactory { override fun createModule( testModule: TestModule, contextModule: KtModuleWithFiles?, + dependencyPaths: Collection, testServices: TestServices, project: Project, - dependencyPaths: Collection, ): KtModuleWithFiles { val libraryJar = ForTestCompileRuntime.runtimeJarForTests().toPath() val librarySourcesJar = ForTestCompileRuntime.runtimeSourcesJarForTests().toPath()