Add a replay feature to zls (#857)

* add config options for `zls --replay`

* implement `zls --replay`

* remove carriage return from zls replay files

* add missing arguments for Server.init in tests
This commit is contained in:
Techatrix
2022-12-31 06:45:45 +00:00
committed by GitHub
parent 417bf9bd0a
commit 3449269fd3
9 changed files with 250 additions and 92 deletions

View File

@@ -89,6 +89,21 @@
"type": "integer",
"default": "1048576"
},
"record_session": {
"description": "When true, zls will record all request is receives and write in into `record_session_path`, so that they can replayed with `zls replay`",
"type": "boolean",
"default": "false"
},
"record_session_path": {
"description": "Output file path when `record_session` is set. The recommended file extension *.zlsreplay",
"type": "string",
"default": "null"
},
"replay_session_path": {
"description": "Used when calling `zls replay` for specifying the replay file. If no extra argument is given `record_session_path` is used as the default path.",
"type": "string",
"default": "null"
},
"builtin_path": {
"description": "Path to 'builtin;' useful for debugging, automatically set if let null",
"type": "string",