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
For use in plugins and the editor, preferences need to be able to be properly dendrified, i.e. transformed into an object tree where keys with . are transformed into multiple objects:
{
"a.b": true,
"a.c": false
}
Becomes
{a: {b: true,c: false,}}
As a consequence, it must not be permitted that any preference key be an extension of another preference key with a value:
{
"a": "already has a value!""a.b": "now I can't be a key of object a!"
}
Internally, VSCode is careful to ensure that that doesn't happen, but Theia is not as strict, so problems can occur if plugins don't play by the rules. See here, for example.
Steps to Reproduce:
Install clang-format
Start the application.
See an error TypeError: Cannot create property 'windows' on string 'clang-format'
Additional Information
Operating System: RHEL7, Electron
Theia Version: 1.28
The text was updated successfully, but these errors were encountered:
It shouldn't be possible to get the error just by writing something bad in your settings.json because we ignore anything in the settings.json that isn't part of the schema - you need a bad schema to get the error. clang-format has written their preference schema so that there exist (they think) these keys:
But that can't be dendrified. VSCode recognizes that clang-format.executable has to be a leaf because it has type string, so it ignores the rest. We currently don't ignore the rest, so when we try to dendrify the structure, we try to say the equivalent of 'clang-format'.windows = 'clang-format', and an error gets thrown.
@colin-grant-work@tsmaeder
The new ConfigurationModelParser introduced here handles key conflicts.
In the current master I see following errors logged: 2024-01-11T13:52:30.444Z root ERROR [hosted-plugin: 96058] Conflict in settings file Default: Ignoring clang-format.executable.windows as clang-format.executable is "clang-format"
Bug Description:
For use in plugins and the editor, preferences need to be able to be properly dendrified, i.e. transformed into an object tree where keys with
.
are transformed into multiple objects:Becomes
As a consequence, it must not be permitted that any preference key be an extension of another preference key with a value:
Internally, VSCode is careful to ensure that that doesn't happen, but Theia is not as strict, so problems can occur if plugins don't play by the rules. See here, for example.
Steps to Reproduce:
clang-format
TypeError: Cannot create property 'windows' on string 'clang-format'
Additional Information
The text was updated successfully, but these errors were encountered: