-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Warning on all settings.json: `$ref 'definitions/length' in {1} can not be resolved' #31932
Comments
This issue was moved to hoovercj/vscode-power-mode#9 |
@roblourens I think there is still a vscode bug here. The error says "in {1}". Shouldn't vscode actually output what the {1} is, at least? |
Possibly, the warning comes from here - https://github.com/Microsoft/vscode-json-languageservice/blob/master/src/services/jsonSchemaService.ts#L408 If you know what's triggering it in vscode-power-mode, I can investigate some more. |
In this line: The first placeholder is escaped but the second isn't. Is it a simple.matter of changing the line to:
|
There are escaped quotes around the placeholder, but the placeholder doesn't need to be escaped. |
Ok, I see now that the escaped quotes around the first placeholder are simply cosmetic and there does not need to be escaped quotes around the second placeholder. Based on that line, though, it appears that something is preventing I didn't write the schema myself, I found it from here. I've gone in and added an So I've reduced it to the minimal repro below (I added the id's hoping they would help but they did not): What extra information is needed to make this schema valid? And can the vscode side of things be improved to make the error more useful in this scenario?
|
Now I see |
I don't see a way to improve that as the JSON extension only sees one big schema. |
hoovercj/vscode-power-mode needs to fix this. It must not use $ref in the configuration contribution. |
@aeschli thanks, that helped |
I'm flattered that some of you have my extension installed and I'm sorry that it's spamming your I'm confused, though, I must have misunderstood the comment by @aeschli here: #30762 (comment)
@aeschli can you elaborate on what you meant here? I am using the configuration contribution point and I am using a relative $ref. If $ref is not supported in |
@hoovercj Sorry for my conflicting statement. |
Thanks for the clarification. I understand now that it is not possible. Now the error should be gone :-) |
All settings.json files show this warning:
The text was updated successfully, but these errors were encountered: