Skip to content

Commit b73bd04

Browse files
committed
[Compiler plugin] File with "cached" schemas can become corrupted. Fallback to an empty list
1 parent 72e7506 commit b73bd04

File tree

1 file changed

+6
-1
lines changed
  • plugins/kotlin-dataframe/src/org/jetbrains/kotlinx/dataframe/plugin/extensions

1 file changed

+6
-1
lines changed

plugins/kotlin-dataframe/src/org/jetbrains/kotlinx/dataframe/plugin/extensions/IrBodyFiller.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ class IrBodyFiller(
8787
val file = File(dir, "schemas.json")
8888
val res = if (file.exists()) {
8989
val json = file.readText()
90-
Json.decodeFromString<List<IoSchema>>(json) + schemas
90+
val res = try {
91+
Json.decodeFromString<List<IoSchema>>(json)
92+
} catch (e: Exception) {
93+
emptyList()
94+
}
95+
res + schemas
9196
} else {
9297
schemas
9398
}

0 commit comments

Comments
 (0)