Skip to content

Commit a196904

Browse files
committed
Better file watcher (create events)
TODO: - Unsafe fallback option - Better file watcher (watch the whole local repo) - Check how exceptions are handled while in checkers - Store matched stacktrace with the exception for highlighting
1 parent 12ddbbb commit a196904

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/kotlin/com/github/mr3zee/kotlinPlugins/KotlinPluginsStorage.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,10 @@ class KotlinPluginsStorage(
608608
if (old?.checksum != locatorResult.state.jar.checksum) {
609609
old?.key?.cancel()
610610

611-
original.parent?.registerSafe(StandardWatchEventKinds.ENTRY_MODIFY)?.let {
611+
original.parent?.registerSafe(
612+
StandardWatchEventKinds.ENTRY_MODIFY,
613+
StandardWatchEventKinds.ENTRY_CREATE,
614+
)?.let {
612615
WatchKeyWithChecksum(it, locatorResult.state.jar.checksum)
613616
}
614617
} else old
@@ -888,8 +891,10 @@ class KotlinPluginsStorage(
888891
if (old?.checksum != checksum) {
889892
old?.key?.cancel()
890893

891-
original?.parent?.registerSafe(StandardWatchEventKinds.ENTRY_MODIFY)
892-
?.let { WatchKeyWithChecksum(it, checksum) }
894+
original?.parent?.registerSafe(
895+
StandardWatchEventKinds.ENTRY_MODIFY,
896+
StandardWatchEventKinds.ENTRY_CREATE,
897+
)?.let { WatchKeyWithChecksum(it, checksum) }
893898
} else old
894899
}
895900

0 commit comments

Comments
 (0)