-
Notifications
You must be signed in to change notification settings - Fork 148
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
[wip] Add Language Server Proxy Kernel #278
base: main
Are you sure you want to change the base?
Conversation
I'm thinking about cherry-picking the improvements from |
Take whatever you feel will help... I was hoping to get to a
fully-specified autogenerated definition of the protocol for our purposes,
but that's still a ways off, and the typing is already more concise in this
approach.
Follow-on would be some way to do dynamic message registration for e.g the
latex build/search, but having the full spec first is priority! This will
make adding new features _much_ easier, as the new feature package(s) would
already have the "boring" parts ready, and can get straight to the UI.
|
I do intend to get back to this, but it will be some time before other stuff settles down, I'll wager. I can also mentor anybody that might interested in picking this back up. Some thoughts I had captured elsewhere, but is relevant here:
Some I think we need for this work to be successful/maintainable, long-term:
|
I am concerned about two things:
The first one we can measure the other we don't have much influence on. |
But I absolutely did not mean to close this one, there is a lot of valuable work in here :) |
Co-authored-by: bollwyvl Co-authored-by: krassowski
References
Code changes
A lot. Too much. Enough that this might be unmergeable, as-is and will bitrot really fast. Here's the various yak shaves i had to go down:
LanguageServerManager
jupyter.lsp
comm target to replace WebSockets (indata
) and REST (inmetadata
)jupyter.lsp.control
comm target for status, etc. (formerly REST API)also handles PageConfigjupyter.lsp.language_server
comm target for JSON-RPC (formerly WebSockets)lsp-ws-connection
dependency and codeevent-emitter
dependencyvscode-*
dependenciesvscode-language-server-protocol
(duplicate the oneenum
)connection
andlsp-ws-connection
lsProtocol
->LSP
)User-facing changes
jupyter lsp kernelspec install
instead ofjupyter serverextension enable
Language Server
kernel will show up in theNotebooks
andConsole
sectionRunning
)Backwards-incompatible changes
At once, total, as well as curiously backwards compatible. I really didn't touch the UI at all, aside from changing imports, and making a few more things asynchronous. But yeah, if anybody was working on a non-open fork and had been doing fancy stuff with our non-according-to-anybody's-spec websockets or REST API, they're hosed.
Chores
Thoughts
I'm actually pretty happy with how this is coming together. In the long run, the Kernel Message Spec will be more stable over time than our custom stuff.
While there's a few singletons right now, I can imagine a kernel being able to register the comm targets, and our manager would be able to ask them if they'd like to contribute.
I'll be punching on this a bit more, but relatively soon, we'll have to decide a path forward: while there are a lot of commits, I don't know if i have the patience to rip this back apart into easily-reviewed pieces.
master
, try a release against2.1
next
branch and target thatStay tuned!