Replies: 9 comments
-
@lonix1 That is very huge JSON Schema - 21k lines of JSON @JPinkney WDYT? |
Beta Was this translation helpful? Give feedback.
-
I only said that above to be snarky, I didn't expect it to actually be true 😄 So I suppose this is a "feature request" for caching schemas. |
Beta Was this translation helpful? Give feedback.
-
We already (from 0.16.0) caching schemas content, but it seems that we need to cache parsed schemas. |
Beta Was this translation helpful? Give feedback.
-
It's probably worth it to take a look on caching parsed schemas to see how much of an improvement we can get. I also wonder if vscode-json-languageservice has performance problems with that schema |
Beta Was this translation helpful? Give feedback.
-
Please take into account that it could be "just me". Don't go to the trouble of improving perf if you can't replicate my scenario! Thanks for looking into it. |
Beta Was this translation helpful? Give feedback.
-
Those schemas are old and is likely that soon we will replace them with newer ones from https://github.com/ansible-community/schemas/tree/main/f -- but at this moment I am waiting for the schema priority feature to be included in YAML extension as without it, we cannot correctly distinguish between playbook files and tasks files. One trick that you can currently use is to disable use of schemaStore completely via |
Beta Was this translation helpful? Give feedback.
-
If you disable the extension from loading schemas, how do you tell it to use schemas from that link? |
Beta Was this translation helpful? Give feedback.
-
@lonix1 Please read main readme https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml -- it does tell you what you can configure and how. Long story short, YAML extension itself cannot be blamed for neither validation failures due to schema bugs or wrong schema use, mainly because by itself it does not have any internal schema assignments. Those assignments come from 3 sources: JSONSchmeStore if enabled, your own settings.json and other settings contributed by other extensions, like the Ansible Language. While I am not sure, my expectation is that user config has precedence over settings from other extensions and jsonschemastore has the lowest priority. I am aware of a bug where multiple schemas ended up being active for the same document, but I think that one was fixed recently. |
Beta Was this translation helpful? Give feedback.
-
I'll look into that thanks |
Beta Was this translation helpful? Give feedback.
-
I uninstalled the old microsoft ansible extension and installed this instead.
I added this:
When I hover over a symbol or trigger autocomplete, it shows
Loading...
for a while, then maybe shows some info. But it does that every time. There's always a delay - as if it's downloading the schema every time.Is this normal, or should I expect it to be instantaneous?
Beta Was this translation helpful? Give feedback.
All reactions