-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix handling malformed recentworkspace.json #10711
Fix handling malformed recentworkspace.json #10711
Conversation
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.
Thank you for your contribution 👍
The test failures on Windows will need to be looked at as they currently fail:
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.
Note that CI is failing. Unless there is a reason to change the way the paths look, please make sure the previous tests for the DefaultWorkspaceServer
still pass.
@vince-fugnitto @paul-marechal thanks for the review and sorry for the CI noise - i should have known this will fail on windows, i've set up a win VM to check locally and fix the tests properly and then get back. |
@vince-fugnitto @paul-marechal adapted the tests and resolved your comments. The tests are now running on all platforms. |
@colin-grant-work do you mind reviewing the pull-request, I believe you opened the original issue #10250. At least for me on |
3fb6061
to
d0d8e08
Compare
In case a recentworkspace.json contains any non string element in its recentRoots array, the JSON is not considered valid. Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com> fix test on windows Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com> one more try to fix test Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com> use uri for windows to try to make test pass Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com> ignore non-string array entries Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com> Replace check for undefined with null Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com>
d0d8e08
to
cc144ee
Compare
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.
LGTM, thanks for the contribution!
Ensures that the value in the file is an array, and filters out and non-string entries.
What it does
Fixes #10250.
In case a recentworkspace.json contains any non string element in its recentRoots array, the JSON is not considered valid.
How to test
Run the provided tests.
Adapt your recentworkspace.json file as specified in issue #10250.
Review checklist
Reminder for reviewers