Skip to content
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

getConfiguration may return malformed results for standard settings #191536

Closed
Colengms opened this issue Aug 28, 2023 · 2 comments
Closed

getConfiguration may return malformed results for standard settings #191536

Colengms opened this issue Aug 28, 2023 · 2 comments
Assignees
Labels
config VS Code configuration, set up issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@Colengms
Copy link
Contributor

When an extension calls getConfiguration to retrieve standard VS Code settings, VS Code doesn't appear to validate those settings adhere to schema.

For example, the following code:

    vscode.workspace.getConfiguration("files").get("associations");

if called with the following setting present:

    "files.associations": {
        "badEntry": false
    }

... will return the invalid bool entry.

We can add code to the (C/C++) extension to process and validate standard settings values returned from getConfiguration, But it may be better for VS Code to do this, so all extensions that query standard VS Code settings can benefit and would not have to replicate that validation process.

In the case of the C/C++ Extension, this issue results in a failure in our native process, as our native JSON deserialization code fails to process the unrecognized content, leading to the messages containing that content being discarded as invalid.

Related cpptools bug: microsoft/vscode-cpptools#11375


Does this issue occur when all extensions are disabled?: N/A

  • VS Code Version:
    Version: 1.82.0-insider (user setup)
    Commit: f7973f3
    Date: 2023-08-28T05:35:52.131Z
    Electron: 25.5.0
    ElectronBuildId: 23084831
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.22621

  • OS Version: Windows 11

@sandy081 sandy081 added the config VS Code configuration, set up issues label Aug 29, 2023
@sandy081
Copy link
Member

/duplicate

#125422

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 29, 2023
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
config VS Code configuration, set up issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants