zigtools / zls

A Zig language server supporting Zig developers with features like autocomplete and goto definition
MIT License
2.84k stars 285 forks source link

LSP cancelRequest 13gb log file #839

Closed lantos1618 closed 1 year ago

lantos1618 commented 1 year ago

Zig Version

0.10.0-dev.4587+710e2e7f1

Zig Language Server Version

7ef224467ab2f3179058981740e942977892e7b9

Steps to Reproduce

install ZLS then and install lunavim + mason lsp

#install luna vim https://www.lunarvim.org/docs/master/installation
LV_BRANCH='release-1.2/neovim-0.8' bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)

mkdir test
cd test
zig init-exe
lvim src/main.zig

Expected Behavior

to quietly fail. As specified here https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#cancelRequest

and

https://github.com/zigtools/zls/blob/c355a54dd1072fafa1c4b37d6f1d2b5b31255475/src/Server.zig#L1753

Actual Behavior

Getting the following spam

[ERROR][2022-12-20 12:10:48] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:49] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:49] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:50] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:50] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:51] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"
[ERROR][2022-12-20 12:10:51] .../vim/lsp/rpc.lua:733    "rpc"   "zls"   "stderr"    "warning: (server): method not mapped: $/cancelRequest\n"

spammed logs and it turned into a 13GB log file pretty quick

Techatrix commented 1 year ago

since 784047d9522c6f913df44fb662f953afe350b38f you will no longer get this log messages. If you want this fixed, update from the 0.10.0 release to master.