-
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
Jump to definition handling spaces in URI inconsistently #403
Comments
Good catch, thanks for the solid details. We should be able to reproduce
this in test.
What's the rootUri in pageConfig (from view source of lab)? If that's
messed up, we have deeper issues.
|
Welp, over on #406, I'm not getting any particular insights back from running all of the acceptance tests from within I'm investigating:
If these come up without reproducible errors, I definitely will add the If the problems persist, there might indeed be deeper problems in What I don't foresee happening is us adding |
The lab terminal log will also show the root uri if you start with:
For example, from the latest CI test:
|
Description
Jump to definition feature doesn't seem to handle spaces in base/parent path correctly. Jump to-feature behaves as if trying to perform a global jump using the .lsp_symlink, even though the target is in same directory than jump source. Getting similar results both in Windows 10 and Ubuntu 18.04:
Reproduce
Not entirely sure if prerequisite in reproducing the issue, but I have jupytext installed.
While debugging the issue I pinpointed the culprit to:
https://github.com/krassowski/jupyterlab-lsp/blob/fbc9d1c2f67842352acbbcb276347c6e65d51d29/packages/jupyterlab-lsp/src/utils.ts#L134
where child and parent:
child = "file:///c:/Users/avaissi/Documents/My own robot/.virtual_documents/tasks/extension.py"
parent = "file:///c:/Users/avaissi/Documents/My%20own%20robot"
thus failing the
child.startsWith(parent)
comparison.When tried to wrap the
parent || server_root_uri()
withdecodeURI()
->parent = decodeURI(parent || server_root_uri());
things worked nicely.Expected behavior
I'm expecting the jump to complete to a file/location within same directory.
And furthermore, I'm expecting the URI to compare spaces (and possibly other special characters) either encoded or decoded.
Context
Required: installed server extensions
Required: installed lab extensions
Browser Output (recommended for all interface issues)
The text was updated successfully, but these errors were encountered: