-
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
investigate escaping jumping to definition (and other features) with spaces #406
Conversation
Ha: failed to even start the acceptance tests on windows, so haven't yet reproduced (even though it's failing). We're generally very careful about paths, but the way we start jupyter under test is quite kludgy... I'll look at doing more of it with a json file which is less sensitive to paths/escaping. |
Anything here I could help with? Maybe to investigate the issue more for root cause, if not already found |
Unfortunately, it's a bit in the weeds! I have a plan, it's just going to
take some time. Spaces, permissions, and unicode should be table stakes for
acceptance testing anything, but it's easy to forget. Thanks again for the
report!
|
scripts/atest.py
Outdated
@@ -80,7 +83,7 @@ def atest(attempt, extra_args): | |||
if previous.exists(): | |||
extra_args += ["--rerunfailed", str(previous)] | |||
|
|||
out_dir = OUT / stem | |||
out_dir = OUT / (stem + GH_403_BAD_PATH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the path addition should not be pushed further down to the actual robot tests. I think that we already have one notebook with space in the name, probably just not the one testing jump functions. Though having this as a top dir would be convenient indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! I was kind of tired.
Moved it (and a number of other paths) down into Variables.robot
... they can be overridden with:
python -m scripts.atest --variable "NOTEBOOK DIR NAME:🐶 🐶 🐶"
would yield:
atest/output/linux_37_1/home/🐶 🐶 🐶/
Yeah the issue is "spaces in the rootUri break everything". Including
starting the test server, at present!
|
gah... the formatting of the flake8 messages now leads with the code, e.g. |
Well, still didn't get to reproducing #403 on windows (or at least hasn't finished), but otherwise good progress... |
Actually had a look deeper: turns out the A few changes throughout were required to normalize this behavior (86f5abe), and make the naming more accurate (89102dd, breaking change), and linting (2e43577) but it should hopefully now be more robust overall, and address some other odd issues I had seen but hadn't narrowed down to this root cause. On #278 I briefly toyed with using an existing URI library, but ran into some issues... it may be worth revisiting, either:
At any rate, whatever we use, we should probably never treat a URI as a plain-old- Going to let a full local clean build run while CI is chugging, and might not address any more this evening... good times! |
Local run looks good, and 89102dd has test wins (aside from lint) on all the platforms: Taking off WIP, ready for review! |
Ok, looks great will merge once CI passes. Thank you! |
Yeah, if there is an issue, and it's just little old me that did the work,
I just put the issue number, instead of The Work... I'm sure whatever state
is in now (if you pushed) is fine! Very good though, to give shout outs
new contributor prs, though!
|
What language server are you using? |
python |
@BugApe, which one:
? Could you open a new issue following bug report template? |
References
Code changes
Variables.robot
(can be overridden from CLI)shell=True
@krassowski/jupyterlab-lsp
(decode|encode)URI
callsencodeURI
the document path@krassowski/jupyterlab_go_to_definition
IGlobalJump.uri
toIGlobalJump.contents_path
User-facing changes
Should reliably Jump between files in folders with spaces and special characters, including when
jupyter lab
is launched from directories containing spaces, especially on windows.Backwards-incompatible changes
@krassowski/jupyterlab_go_to_definition
IGlobalJump.uri
renamed toIGlobalJump.contents_path
Chores