-
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
preferences: fix merge method in PreferenceProvider #12126
preferences: fix merge method in PreferenceProvider #12126
Conversation
- when merging preferences, also merge properties of type array
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.
Code LGTM and the changes work as described.
@AlexandraBuzila can we close the related issue? It didn't auto-close, it seems. |
I think the main problem that was reported in that ticket is solved by this PR, however there was a second issue mentioned in the ticket description: if there are launch configurations defined both in "someProject/.theia/launch.json" and "someProject/.vscode/launch.json", only the ones from the If the current behavior is expected and should not be changed, then the ticket can be closed from my point of view 👍 |
If we're not sure it's completely fixed, you did the right thing leaving it open, IMO. I was just wondering. |
Hi, I believe that this PR introduced a bug. I've been working to improve the browser test suite and when I rebased to include it, over 100 tests from Please see: #12153 |
Hi @marcdumais-work! Thank you for catching this, I will have a look ASAP. |
This reverts commit b28c8b9.
This reverts commit b28c8b9.
What it does
When merging preferences, in the PreferenceProvider, also merge properties of type array. Currently, properties of type object are merged, but for arrays only the value from the target JSON is used.
This fixes the first use case described in issue #8987, where launch configs defined in the workspace are not visible, if other launch configs exist in a
launch.json
file.How to test
.theia-workspace
file, e.g.:Debug
view and check that the launch configs from the workspace file are present in the dropdown at the top of the view..theia/launch.json
file with at least one launch configuration, e.g.:Debug
view and check that the launch configs fromlaunch.json
are visible in the dropdown, alongside the ones from the workspace file.Review checklist
Reminder for reviewers