lean4-htt/tests/lean/server/init_exit_worker.lean
Sebastian Ullrich 68eaf33e86
feat: snapshot trees and language processors (#3014)
This is the foundation for work on making processing in the language
server both more fine-grained (incremental tactics) as well as parallel.
2024-03-14 13:40:08 +00:00

16 lines
443 B
Text

import Lean.Data.Lsp
open IO Lean Lsp
def main : IO Unit := do
Ipc.runWith (←IO.appPath) #["--worker"] do
let hIn ← Ipc.stdin
hIn.write (←FS.readBinFile "init_vscode_1_47_2.log")
hIn.flush
hIn.write (←FS.readBinFile "open_empty.log")
hIn.flush
let diags? ← Ipc.collectDiagnostics 1 "file:///empty" 1
assert! diags?.isSome
Ipc.writeNotification ⟨"exit", Json.null⟩
discard Ipc.waitForExit