RangeError: Maximum call stack size exceeded
Hi, I'm trying to run the language server using emacs' lsp-mode,
but the server is crashing shortly after starting with the following
stderr output:
Language Server is started. node:internal/fs/utils:248 function getDirents(path, { 0: names, 1: types }, callback) { ^
RangeError: Maximum call stack size exceeded at getDirents (node:internal/fs/utils:248:20) at readdirSync (node:fs:1551:34) RangeError: Maximum call stack size exceeded at getAwkFilesInDir (<...>/nodejs/20.7.0/lib/node_modules/awk-language-server/out/io.js:22:26)
Same thing with node versions v18.5.0 and v20.7.0.
Tracing the calls from lsp-mode to the awk language server, it appears
that emacs is receiving a request for 'workspace/workspaceFolders', then
sending its response 'workspace/workspaceFolders' with params:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"uri": "file:///..."
},
etc...
]
}
At which point the error happens.
Do you know why this might be? A problem on the lsp-mode side or with the language server?
Running with the --noIndex flag seems to fix the problem, not sure if that should be default in lsp-mode,
or if the server should be able to run without it?