Open files via Jupyter instead of LSP #357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to:
tokio::Runtime
andClient
toRMain
#193As I was working on posit-dev/positron#2999, I initially thought that
Backend
should be the sole owner of aWorldState
struct which should not be clonable, which meant Backend could no longer be clonable. This PR is a step towards making the LSP the sole owner ofBackend
by changing our implementation offile.edit()
to make a request via the UI Jupyter comm instead of the LSP. The Jupyter request is blocking, unlike the LSP one, but this is sufficiently fast that it shouldn't matter.Note that I later figured out that a clonable state is a good thing as long it doesn't have any interior mutability. A clone of the worldstate is a snapshot and it allows background workers to work without risking having their data change from under their feet. In any case, making the kernel independent from the LSP is cleaner (see posit-dev/positron#3180), so I've kept this commit.