-
Notifications
You must be signed in to change notification settings - Fork 272
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
Register a non-standard LSP content request for resolving schemas on the client side #359
Conversation
…s LSP request gets triggered when an HTTP/HTTPS request to a schema is being made. Instead of the server resolving the schema the language server will send the URI to the client side to be resolved. This has to be done in order to circumvent signed certificate errors that happen when you are trying to fetch the schemas outside of VSCode. Signed-off-by: Josh Pinkney <[email protected]>
Signed-off-by: Josh Pinkney <[email protected]>
That is true, but only for main vscode code, all extensions works in regular Node.JS instance, which spawn from Electron process. Maybe VSCode has some code which set up cert for extensions node.js process. Need to look on that. |
Hmm, it looks like |
Yes, try |
@aeschli I see that you brought the json schema fetching for http and https into the ext host quite a long time ago (microsoft/vscode@849d941), was your reasoning because of self-signed certificates like ours? User's keep running into self signed certificate issues and I'm not sure of a clear way to resolve this other then grabbing the schemas from the extension host as well |
@JPinkney I made some investigation on this.
|
Signed-off-by: Josh Pinkney [email protected]
What does this PR do?
This PR registers a non-standard LSP request used specifically for VSCode. This LSP request gets triggered when an HTTP/HTTPS request to a schema is being made. Instead of the server resolving the schema the language server will send the URI to the client-side to be resolved. This has to be done in order to circumvent signed certificate errors that happen when you are trying to fetch the schemas outside of VSCode. From my understanding, VSCode is using Electron which uses Chromium which has certs already installed so this is why we have to do it this way and can't just fetch the schemas normally. I assume this is also why vscode-json-languageservice does the same thing
What issues does this PR fix or reference?
redhat-developer/vscode-yaml#107
Is it tested? How?
The only way I know how to test this is on the Red Hat VPN.
You'll need the client-side changes: redhat-developer/vscode-yaml#395
Once you connect to the VPN these schemas should resolve correctly