Comments (7)
Handling server bugs would probably be the last thing we would want to do here. Why not just report it in the server repo?
The unregisterations
param is required per spec so it's a spec violation.
from lsp.
I am not aware of spec details as I don't follow them anymore. Just noticed that traceback and asking for feedback. I can't judge it being malformed or not, just a hunch.
That said, changing lin 1982 to
unregistrations = params.get("unregisterations") or [] # typo in the official specification
would cause the empty params to be ignored silently.
EDIT: I actually not sure which side initiates unregistration. Could also have been a malformed request from LSP -> LemMinX.
from lsp.
Server initiates this
<-- LemMinX client/unregisterCapability (16): {}
My feedback is that it's a spec violation on the server side. It's specified in https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#client_unregisterCapability where the unregisterations
property is not optional. It can be set to empty array though although it doesn't really make sense to send it then.
And yes, my point is that we don't want to hide spec violations with changes like the suggested one.
from lsp.
Shouldn't it just return a relevant error code to the server then, instead of raising a local exception?
from lsp.
Potentially yes. But then we'd need to run all the code within a try block which could also hide real issues on our side. If I'd to pick one of those two then I'd rather prefer the current behavior. But maybe there is a third option...
from lsp.
Third option could be to verify the schema of incoming requests/notifications and raise errors in that case.
from lsp.
Yea, basing LSP on pydantic. 😆
from lsp.
Related Issues (20)
- Capabilites with selector fails to register
- ModuleNotFoundError: No module named 'wcmatch.glob' HOT 13
- Prepare for upgrade of bracex and wcmatch libraries HOT 6
- [Runtime Error] ModuleNotFoundError: No module named 'wcmatch' HOT 1
- Investigate why didSave notification is not sent if view closed immediately after saving
- Two alternative hover definitions provided: one on mouseover, the other upon keyboard shortcut HOT 6
- Not Working After 3.8 Upgrade HOT 3
- Discuss removal of some APIs HOT 3
- Allow LSP packages to customize format_completion HOT 1
- Support list of commands, provided by language servers HOT 5
- Syntax highlighting in popups, returned by 3rd party language server, not work HOT 10
- Package is not installable HOT 5
- MissingUriError: View has no URI HOT 1
- `websocket_server` installs a root logger
- Cannot install LSP on clean installation HOT 15
- Updated to LSP 2.1.0 leads to FileNotFoundError and no LSP HOT 4
- `lsp_code_actions_on_save` do not work intermittently HOT 8
- KeyError on file-watcher HOT 2
- Replace `Enum` object with it's scalar value in the LSP log panel? HOT 1
- Text selection in popups HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.