JS: several bugfixes in incremental compilation

1. Fix exported packages sometimes being mixed up
2. Fix metadata losing package fragments sometimes
3. Don't serialize empty packages to .meta.js
4. Preserve order of package fragments in .meta.js
5. In IC tests, compare textual representation of metadata rather
   than binary representation
This commit is contained in:
Alexey Andreev
2017-10-19 12:19:34 +03:00
parent 2fbecfdd9c
commit e1f8bac4d5
7 changed files with 84 additions and 17 deletions
@@ -0,0 +1,31 @@
// EXPECTED_REACHABLE_NODES: 1126
// MODULE: lib
// FILE: a.kt
package a.p
fun foo() = "foo"
// FILE: b1.kt
// RECOMPILE
package b.p
fun bar() = "bar"
// FILE: b2.kt
package b.p
fun baz() = "baz"
// MODULE: main(lib)
// FILE: main.kt
import a.p.*
import b.p.*
fun box(): String {
val r = foo() + bar() + baz()
if (r != "foobarbaz") return "fail: $r"
return "OK"
}