You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When vscode.workspace.getConfiguration() is called without providing a section identifier, then the update and inspect methods add an extra "undefined." in front of the dotted property name.
Expected behavior:config.update("x.y.z", true) should add the line "x.y.z": true to settings.json Actual behavior:config.update("x.y.z", true) adds the line "undefined.x.y.z": true
Steps to Reproduce:
Create a VS Code extension that inspects/updates configuration values and install it into Theia. For example, add this code snippet:
I believe this is a regression that was introduced in #11393, and Theia 1.29.0 was the first version with this issue. In the following places, rawSection should not be hardcoded in case it is undefined:
Bug Description:
When
vscode.workspace.getConfiguration()
is called without providing a section identifier, then theupdate
andinspect
methods add an extra "undefined." in front of the dotted property name.Expected behavior:
config.update("x.y.z", true)
should add the line"x.y.z": true
to settings.jsonActual behavior:
config.update("x.y.z", true)
adds the line"undefined.x.y.z": true
Steps to Reproduce:
Create a VS Code extension that inspects/updates configuration values and install it into Theia. For example, add this code snippet:
Note that the first object logged to the console is wrong - the "defaultValue" should be 4 like the second object:
Also note that the contents of settings.json are wrong - the first property that starts with "undefined." is invalid:
Additional Information
I believe this is a regression that was introduced in #11393, and Theia 1.29.0 was the first version with this issue. In the following places,
rawSection
should not be hardcoded in case it is undefined:theia/packages/plugin-ext/src/plugin/preference-registry.ts
Lines 171 to 173 in a733057
theia/packages/plugin-ext/src/plugin/preference-registry.ts
Lines 180 to 181 in a733057
The text was updated successfully, but these errors were encountered: