[IR] Enhance error reporting for IR linking issues

^KT-44626

Typical use case:
- There are two KLIB libraries: A and B.
- Library A has two versions: A.v1 (older) and A.v2 (newer).
- A.v2 is ABI-incompatible with A.v1.
- B depends on A and was compiled against A.v1.
- An attempt to build the application with A.v2 and B fails with weird error message. It's unclear for end user what's wrong and what needs to be done to fix the issue.

The fix improves error reporting for the following particular cases:
- A symbol that is gone (KT-41378)
- A class that became a typealias (KT-47285, KT-46697)
- A typealias that became a class (KT-46340)
This commit is contained in:
Dmitriy Dolovov
2021-06-10 11:40:16 +03:00
parent 672b972b38
commit c1fb40a436
15 changed files with 1046 additions and 81 deletions
@@ -58,6 +58,7 @@ data class File constructor(internal val javaPath: Path) {
get() = if (exists) listFiles else emptyList()
fun child(name: String) = File(this, name)
fun startsWith(another: File) = javaPath.startsWith(another.javaPath)
fun copyTo(destination: File) {
Files.copy(javaPath, destination.javaPath, StandardCopyOption.REPLACE_EXISTING)