-
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
Should we add a custom ContentsManager
in jupyter-lsp
server?
#850
Comments
My concern about a server (AnyNew)ContentsManager: with the extend-by-subclass pattern used by many of the server components, this would immediately make the new contentsmanager incompatible with all the other 3rd-party contents managers. I had hopes for hybridcontents, but it seems to have petered out. We've had some luck on jupyterlite, but it ain't fun. Another approach would be to make the extension become more aware of the IDrive API, so we could have a second IDrive altogether, powered by a separate endpoint... if it's actually jupyter_server contents code, all the better, but this seems like perhaps the least likely to conflict with other setups. As long as it brought along a bit more info about its |
And behind the new endpoint would be our new contents manager which has only one responsibility: serving files outside of root? It would still require us to do something about third-party contents managers (or them do to something, not sure yet), but would not clash with them, right? |
On Sat, Sep 3, 2022, 08:09 Michał Krassowski ***@***.***> wrote:
Another approach would be to make the extension become more aware of the
IDrive API, so we could have a second IDrive altogether, powered by a
separate endpoint...
And behind the new endpoint would be our new contents manager which has
only one responsibility: serving files outside of root?
Right. Either with some symbolic names or.
It would still require us to do something about third-party contents
managers (or them do to something, not sure yet),
Right... Maybe we'd want some kind of facade that wrapped an existing
contents manager _class_, but not the same instance, so that adding another
was cheap.
Of course, going this way, if we _knew_ a bunch of paths, we could already
start LSIF discovery/indexing in the background, which is really how we'd
overcome many performance issues.
but would not clash with them, right?
Right, it usually gets prefixed, e.g. like `lsp:lib/python3.10/` (: is
otherwise more valid). The jupyterlab-github example is maybe the most
complete, as the GDrive one hasn't been touched in so long.
|
Just for completeness debugger also users read-only editors; it sends a debugger And there was a read-only editor "code viewer" added in jupyterlab/jupyterlab#12365 (jupyterlab/jupyterlab#12361). Read only mode was also discussed for the needs of RTC: jupyterlab/jupyterlab#12960 |
Currently we rely on a symlink workaround to allow navigation to files outside of root directory. This is suboptimal for multiple reasons:
Proposed solution
jupyter-lsp
should come with a customContentsManager
for external file access; we could call itGlobalContentsManager
or similarsite-packages
and others, but less so to my full disk root; for example:jupyter password
allows to set password without having to worry about where the config is located, we could have:jupyter lsp file-access allow-editing /path/to/prefix
could help users who are not well versed in jupyter config.Front-end could advise the user to enable access or editing on the server side as needed.
The text was updated successfully, but these errors were encountered: