IR: add isProvidedByDefault() to SearchPathResolver

This commit is contained in:
Georgy Bronnikov
2019-11-28 16:54:29 +03:00
parent ed4be36484
commit 47d6bdfd35
2 changed files with 2 additions and 0 deletions
@@ -117,6 +117,7 @@ class KotlinLibraryResolverImpl<L: KotlinLibrary>(
newDependencies = newDependencies.map { library: KotlinResolvedLibraryImpl ->
library.library.unresolvedDependencies.asSequence()
.filterNot { searchPathResolver.isProvidedByDefault(it) }
.map { KotlinResolvedLibraryImpl(searchPathResolver.resolve(it)) }
.map { resolved ->
val absoluteFile = resolved.library.libraryFile.absoluteFile
@@ -15,6 +15,7 @@ interface SearchPathResolver<L: KotlinLibrary> : WithLogger {
fun resolve(givenPath: String): L
fun defaultLinks(noStdLib: Boolean, noDefaultLibs: Boolean, noEndorsedLibs: Boolean): List<L>
fun libraryMatch(candidate: L, unresolved: UnresolvedLibrary): Boolean
fun isProvidedByDefault(unresolved: UnresolvedLibrary): Boolean = false
}
interface SearchPathResolverWithAttributes<L: KotlinLibrary>: SearchPathResolver<L> {