You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent diagnostics behaviour due to range #584
If a language server specifies 1<<32 - 1 (4294967295) for diagnostic.range.end.character then it does not appear to work. I guess JetBrains still does not support this per this other claim from 2019. I understand that no consensus has been reached there but could this "known issue" be documented somewhere in this repository?
If my diagnostics array has a) one valid diagnostic with a "non-crazy" range and b) a second diagnostic with said crazy range, neither of them will show up and I do not see a Received notification 'textDocument/publishDiagnostics' message in the "Traces" section. Why would the traces be filtered out? 🤔
I think I understand the issue now. The character must be a uinteger which the specification defines as 2^31 - 1 (2147483647) which is lower than 4294967295. So the conversion code is probably raising an exception or becoming a negative number somewhere. That's an issue with the language server which can be corrected on that end this but it does not quite explain why the "Traces" section is not showing the JSON-RPC notification at all. 🤔
Part 2 of this issue, a message that LSP4J can't parse never showing in the LSP console's traces, is in #2213.
Part 1 isn't LSP4IJ's to fix: 4294967295 is above LSP's maximum integer (2^31 − 1), so LSP4J can't parse the message. LSP4IJ already reads the spec's maximum as "end of line" (#1169), and with #2213 such a message at least shows in the traces, with the field and value that failed.
Part 1 isn't LSP4IJ's to fix: 4294967295 is above LSP's maximum integer (2^31 − 1), so LSP4J can't parse the message. LSP4IJ already reads the spec's maximum as "end of line" (fix: using integer max value as line end indicator #1169).
Activity
angelozerr commentedon Oct 25, 2024
I have tried to manage invalid range like vscode does.
Any contribution are welcome to improve it.
rcjsuen commentedon Oct 25, 2024
I think I understand the issue now. The
charactermust be auintegerwhich the specification defines as2^31 - 1(2147483647) which is lower than 4294967295. So the conversion code is probably raising an exception or becoming a negative number somewhere. That's an issue with the language server which can be corrected on that end this but it does not quite explain why the "Traces" section is not showing the JSON-RPC notification at all. 🤔angelozerr commentedon Oct 25, 2024
Is not a problem coming from LSP4J (not LSP4IJ). Perhaps your issue is similar to #579 ?
rcjsuen commentedon Oct 25, 2024
Thanks Angelo. Yeah, my guess is your comment here which I guess explains why the "Traces" section is empty.
Could we at least get a "Failed to deserialize JSON-RPC message" in the "Traces" section or something? That would have helped with debugging.
angelozerr commentedon Oct 25, 2024
I agree it would be nice but I don't know if it ispossible to do hat since the error comes from LSP4J.
Any contribution are welcome!
lagergren commentedon Nov 24, 2026
Part 2 of this issue, a message that LSP4J can't parse never showing in the LSP console's traces, is in #2213.
Part 1 isn't LSP4IJ's to fix: 4294967295 is above LSP's maximum integer (2^31 − 1), so LSP4J can't parse the message. LSP4IJ already reads the spec's maximum as "end of line" (#1169), and with #2213 such a message at least shows in the traces, with the field and value that failed.
fix: the LSP console's traces show a message of a language server tha…
lagergren commentedon Nov 25, 2026
Closing, as everything that LSP4IJ can do here is done:
b572a504, for 0.30.2). A message that LSP4J can't parse now shows in the LSP console's traces, with the field and value that failed.