[K/N] Partially fix IncrementalCompilationTest

^KT-59245
This commit is contained in:
Vladimir Sukharev
2023-06-26 20:00:39 +02:00
committed by Space Team
parent e240d7aae3
commit 4cfcf45120
2 changed files with 2 additions and 1 deletions
@@ -270,6 +270,7 @@ class CacheBuilder(
if (generateTestRunner != TestRunnerKind.NONE && libraryPath in includedLibraries) {
put(KonanConfigKeys.GENERATE_TEST_RUNNER, generateTestRunner)
put(KonanConfigKeys.INCLUDED_LIBRARIES, listOf(libraryPath))
configuration.get(KonanConfigKeys.TEST_DUMP_OUTPUT_PATH)?.let { put(KonanConfigKeys.TEST_DUMP_OUTPUT_PATH, it) }
}
put(KonanConfigKeys.CACHED_LIBRARIES, cachedLibraries)
put(KonanConfigKeys.CACHE_DIRECTORIES, listOf(libraryCacheDirectory.absolutePath))
@@ -59,7 +59,7 @@ class KonanLibrariesResolveSupport(
// But currently the resolver is in the middle of a complex refactoring so it was decided to avoid changes in its logic.
// TODO: Handle included libraries in KonanLibraryResolver when it's refactored and moved into the big Kotlin repo.
internal val resolvedLibraries = run {
val additionalLibraryFiles = includedLibraryFiles + listOfNotNull(libraryToCacheFile)
val additionalLibraryFiles = (includedLibraryFiles + listOfNotNull(libraryToCacheFile)).toSet()
resolver.resolveWithDependencies(
unresolvedLibraries + additionalLibraryFiles.map { UnresolvedLibrary(it.absolutePath, null) },
noStdLib = configuration.getBoolean(KonanConfigKeys.NOSTDLIB),