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
Does this issue occur when all extensions are disabled?: Yes/No
VS Code Version: 1.88.1
OS Version: Windows 11
Steps to Reproduce:
Follow the repro steps for this bug: microsoft/vscode-cmake-tools#3651. This is the root bug that I was investigating that caused me to create this.
I think I've noticed the issue.
Effectively, if you open the folder WITHOUT the CMakePresets.json file open. Then, perform an action that activates the CMake Tools extension, THEN open up the CMakePresets.json file, since the provider is already activated, the provideTextDocumentContent method that the CMake Tools extension provides will get called.
However, if you open the CMakePresets.json file BEFORE the CMake Tools extension is activated, even after activating the CMake Tools extension and closing an reopening the CMakePresets.json file, the validation still fails.
This makes me think that the provideTextDocumentContent isn't being called again for new providers when extensions are activated.
Technically we could fix this by adding an onFileSystem:cmake-tools-schema activationEvent, but I'm not sure yet whether we want to do this.
Thanks
The text was updated successfully, but these errors were encountered:
Follow the repro steps for this bug: microsoft/vscode-cmake-tools#3651. This is the root bug that I was investigating that caused me to create this.
Sorry, I cannot go through that. Minimal repro steps welcome.
This makes me think that the provideTextDocumentContent isn't being called again for new providers when extensions are activated.
Can you provide more context? Is the CMakePresets.json-file a real file on disk or where does it come from? Also, who is provide its contents in case your extension hasn't been activated yet.
Generally, "yes" we don't call provideTextDocumentContent again if the document is already open and "owned" by another provider
I'm not 100% sure I understand your question. But the CMake Tools extension uses the package.json jsonValidation entry to associate the files with the schema-uri
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Follow the repro steps for this bug: microsoft/vscode-cmake-tools#3651. This is the root bug that I was investigating that caused me to create this.
I think I've noticed the issue.
Effectively, if you open the folder WITHOUT the CMakePresets.json file open. Then, perform an action that activates the CMake Tools extension, THEN open up the CMakePresets.json file, since the provider is already activated, the
provideTextDocumentContent
method that the CMake Tools extension provides will get called.However, if you open the CMakePresets.json file BEFORE the CMake Tools extension is activated, even after activating the CMake Tools extension and closing an reopening the CMakePresets.json file, the validation still fails.
This makes me think that the
provideTextDocumentContent
isn't being called again for new providers when extensions are activated.Technically we could fix this by adding an
onFileSystem:cmake-tools-schema
activationEvent, but I'm not sure yet whether we want to do this.Thanks
The text was updated successfully, but these errors were encountered: