-
Notifications
You must be signed in to change notification settings - Fork 260
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
Schema reference in URL hash can’t be resolved #585
Comments
This is a real blocker for me, so I decided to try and solve it myself. I am not able to reproduce this issue by debugging by following these steps, as in: It works as expected then using whatever versions. And yes, I really made sure I was using the correct versions, ran Instead I decided to give it a try with I use call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
call plug#end() However, if I use a local clone of au User lsp_setup call lsp#register_server({
\ 'name': 'yaml',
\ 'cmd': {server_info->['node', 'out/server/src/server.js', '--stdio']},
\ 'allowlist': ['yaml'],
\})
call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/vim-lsp'
call plug#end() |
I narrowed it down to an upstream bug introduced in |
Version 4.1.9 introduces a regression causing redhat-developer#585.
Version 4.1.9 introduces a regression causing #585.
@remcohaszing Looks like it is resolved, could we close this? |
That really depends on your stance on the matter. A temporary workaround has been applied. I don’t know if that means the issue is resolved. One could argue the issue is gone for now, so the issue can be closed. One could also argue this issue is relevant as long as microsoft/vscode-json-languageservice#123 hasn’t been fixed and released. I’ll let you decide whether you want to close this issue or not. Just please be careful when updating that dependency. :) |
We are going to have to make the dependency update sooner or later. @aeschli, any hints if we can expect a resolution to microsoft/vscode-json-languageservice#123 soon? |
I thought I would chime in that I am experiencing this same issue when using the
Describe the bugWhen a schema uri uses a hash to select a nested schema, the language server can no longer resolve it. This unexpected behavior is experienced in versions 1.1.0, 1.1.1, and the latest 1.7.0 of Expected BehaviorA nested schema can be referenced using a URL hash. Current BehaviorThe following error occurs in VS Code Output pane for 'YAML Support' with Trace enabled:
Steps to ReproduceCreate a YAML file with the below content:
|
I've reduced the issue in my previous comment. I've been unable to get the the Doesn't work
Works
|
@ShawnHardwick Yes, the vscode-json-languageservice doesn't yet properly handle the |
@gorkem @remcohaszing I'm quite sure the original issue has been fixed. microsoft/vscode-json-languageservice#123 is not a proper reproduction of the problem as we never supported |
@aeschli Thanks for the clarification. I couldn't find any references anywhere that |
The schemas now use an intermediate schema to resolve the hash using a ref. For more info, see: microsoft/vscode-json-languageservice#123 redhat-developer/yaml-language-server#585 redhat-developer/yaml-language-server#637 redhat-developer/yaml-language-server#823
The schemas now use an intermediate schema to resolve the hash using a ref. For more info, see: microsoft/vscode-json-languageservice#123 redhat-developer/yaml-language-server#585 redhat-developer/yaml-language-server#637 redhat-developer/yaml-language-server#823
I've noticed that for some schema URLs the hash does resolve correctly but for others it doesn't. Example:
The first line will work but the second one doesn't. The only differences I can see are that the second URL contains characters such as |
Describe the bug
When a schema uri uses a hash to select a nested schema, the language server can no longer resolve it. This was working in
yaml-language-server
1.1.0 and below. It first appeared in 1.1.1.Expected Behavior
A nested schema can be referenced using a URL hash.
Current Behavior
The following error occurs in VS Code:
Steps to Reproduce
app-definition.yaml
.Environment
The text was updated successfully, but these errors were encountered: