Plumbing KlibMetadataVersion and KlibIrVersion values to klib manifest

This commit is contained in:
Alexander Gorshenev
2019-11-28 03:14:25 +03:00
committed by alexander-gorshenev
parent bf12f7eee0
commit b0f077ff4b
22 changed files with 128 additions and 136 deletions
@@ -39,7 +39,7 @@ class KotlinNativeLoadingMetadataCache : BaseComponent {
private val packageFragmentCache = createConcurrentWeakValueMap<CacheKey, CacheValue<ProtoBuf.PackageFragment>>()
private val moduleHeaderCache = createConcurrentWeakValueMap<CacheKey, CacheValue<KlibMetadataProtoBuf.Header>>()
private val libraryVersioningCache = createConcurrentWeakValueMap<CacheKey, CacheValue<KonanLibraryVersioning>>()
private val libraryVersioningCache = createConcurrentWeakValueMap<CacheKey, CacheValue<KotlinLibraryVersioning>>()
fun getCachedPackageFragment(packageFragmentFile: VirtualFile): ProtoBuf.PackageFragment? {
check(packageFragmentFile.extension == KLIB_METADATA_FILE_EXTENSION) {
@@ -93,7 +93,7 @@ class KotlinNativeLoadingMetadataCache : BaseComponent {
}
}
private fun computeLibraryVersioning(manifestFile: VirtualFile): KonanLibraryVersioning? = try {
private fun computeLibraryVersioning(manifestFile: VirtualFile): KotlinLibraryVersioning? = try {
Properties().apply { manifestFile.inputStream.use { load(it) } }.readKonanLibraryVersioning()
} catch (_: IOException) {
// ignore and cache null value