-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Error Code definitions #1270
base: master
Are you sure you want to change the base?
Conversation
This refactors the way error codes are handled, in preparation for making JSONRPC.jl less LSP specific, by hooking into custom error printing provided by an upstream PR.
There's also these error codes that seem to overlap considerably: LanguageServer.jl/src/requests/features.jl Lines 155 to 167 in e67befb
This error code is seemingly used for a formatting failure, but the LSP spec says this specific code should not be used:
This should probably be changed to some other error code, but I don't know how that would interact with the extension. Similarly, this section also defines a new error code for formatting: LanguageServer.jl/src/requests/features.jl Lines 207 to 217 in e67befb
This doesn't conflict with the spec, but it doesn't match the existing formatting error code used above. This needs a decision on whether they should be merged into one error code, or kept distinct. |
Both of those should be |
Since this is basically the same errors, unify the two error codes into one. Technically the two are subtly different (one is trying to format the whole document, while the other is only trying to format a section), but the underlying cause is likely the same, so it's fine to merge them. If necessary/required, they can be disentangled later on too, as currently noone seems to check them anyway.
27cfadd
to
6cce4a4
Compare
This refactors the way error codes are handled, in preparation for making JSONRPC.jl less LSP specific, by hooking into custom error printing provided by an upstream PR. Requires julia-vscode/JSONRPC.jl#70.