Skip to content

[json] schemas in workspace settings also apply to external files #178008

Closed

Description

I have a workspace open with the correct JSON schemas configuration in the workspace's settings.json, but the JSON file in question is outside of this workspace, even though it's open in the workspace's window and matches fileMatch (or at least used to). So, the workspace's settings must have applied to such files before, but not any more. Is this scenario still supported in some other way?

Originally posted by Alexander Regueiro (@alexreg) in #177584 (comment)

Activity

  1. aeschli commented on Mar 22, 2023

    @aeschli
    ContributorAuthor

    To verify:

    • clone https://github.com/aeschli/test-schema-in-workspace
    • open folder test-schema-in-workspace/folder1
    • look at the workspace settings: all files foo.json are associated with schema ./foo-schema.json. Note that this is a relative path to the workspace file
    • open files foo.json in the folder check that code completion gives back property foo-folder1. You can also click on the JSON language selector ({ } next to JSON in the status bar) to see the schema that is associated
    • open external ../folder1/foo.json and check that code completion also gives back property foo-folder1

    To verify that the issue did not break #124491

    • open workspace test-schema-in-workspace/test-schema.code-workspace
    • look at the workspace settings: all files ws.json are associated with schema ./folder2/ws-schema.json. Note that this is a relative path to the workspace file
    • open all files folder1/ws.json, folder2/ws.json and test-schema-in-workspace/ws.json (external file) and check that code completion gives back property ws-folder2.
    • open both files foo.json files and check that code completion gives back property foo-folder1, but only when in folder1.
  2. aeschli commented on Mar 23, 2023

    @aeschli
    ContributorAuthor

    Fixed by #178010

  3. added
    bug
    json
    on Mar 23, 2023
  4. locked and limited conversation to collaborators on May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugjsonverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions