Closed musjj closed 2 months ago
Same
I get these only with the nil
language server, not with nixd
I also get these regularly using the nil
language server.
Same here, using this with nil and getting that error a lot. Formatting straight up never works for me, but the error popup is not always there.
It's especially frustrating since somehow or other the extension is bypassing VS Code's do not disturb mechanisms to suppress notifications. I had to uninstall because I can't stand a wrong and pointless error message popping up every five minutes.
It's especially frustrating since somehow or other the extension is bypassing VS Code's do not disturb mechanism
According to this this is not special to this extension but all error notifications in VSCode by-pass do-not-disturb.
I had to uninstall because I can't stand a wrong and pointless error message popping up every five minutes.
I happen to have it now on every tenth keystroke :grimacing: (at least on new files, probably it was never in a compile-able state yet).
I've also seen this a lot using nixd
:
2024-09-07 21:32:41.015 [error] [jnoortheen.nix-ide] provider FAILED
2024-09-07 21:32:41.015 [error] Error: unknown node type for definition
at rn (/Users/ianchamberlain/.vscode/extensions/jnoortheen.nix-ide-0.3.3/dist/extension.js:6:228)
at yn (/Users/ianchamberlain/.vscode/extensions/jnoortheen.nix-ide-0.3.3/dist/extension.js:5:6240)
at kn (/Users/ianchamberlain/.vscode/extensions/jnoortheen.nix-ide-0.3.3/dist/extension.js:5:6363)
at Immediate.<anonymous> (/Users/ianchamberlain/.vscode/extensions/jnoortheen.nix-ide-0.3.3/dist/extension.js:5:6130)
at process.processImmediate (node:internal/timers:478:21)
It seems like given that both nixd
and nil
seem prone to failed requests, maybe it would make sense to install a middleware that catches errors (or a certain subset of errors) and swallows them (or make it configurable which types of errors can be swallowed, or something, idk)?
See also https://github.com/microsoft/vscode-languageserver-node/issues/517 which is a really old issue about how this was handled in the client.
I guess longer-term it would be better to fix the language server implementations, but since this is a common problem for multiple implementations a short-term workaround on the client might make sense...
Also getting this very often with nixd:
ERR unknown node type for definition: Error: unknown node type for definition
at handleResponse (/Users/abc/.vscode/extensions/jnoortheen.nix-ide-0.3.3/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)
at handleMessage (/Users/abc/.vscode/extensions/jnoortheen.nix-ide-0.3.3/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)
at processMessageQueue (/Users/abc/.vscode/extensions/jnoortheen.nix-ide-0.3.3/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)
at Immediate.<anonymous> (/Users/abc/.vscode/extensions/jnoortheen.nix-ide-0.3.3/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)
at processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
Closing this with reference to #417
Is it really a fix? Why is the error happening so frequently in the first place?
It is a workaround. The real fix has to come from the language servers.
I'm frequently getting this error while typing. Not really sure why.