Invalid missing schema#46
Conversation
8b32c9b to
1f96100
Compare
| } catch { | ||
| } |
There was a problem hiding this comment.
i was wondering since this catch block is empty, a rejected compiledSchema always gets deleted regardless of whether cachedSchemaUri actually depends on schemaUri. For eg. we have 2 unrelated schemas, A (broken) and B (fine), editing B will evict A's cache entry too, resulting in recompile of A the next time it's used, so i just wanted to ask if this is intentional? like is it that a broken entry should get removed whenever anything changes so it can recompile?
There was a problem hiding this comment.
I can't say I completely understand it, but I added a test that shows why it's necessary to clear the cache for invalid schemas. When trying things in the extension host, I'm not seeing any unnecessary recompiles, so I think it's fine. Let me know if you have a better solution.
There was a problem hiding this comment.
Oh got it, i confused it with a different thing, my bad.
63b5208 to
6502aab
Compare
|
I accidentally merged the style cleanup PR into main before this PR, so I updated the tests in this branch to match, which caused a conflict with main. I've resolved it by rebasing onto main. If everything looks right to you shall i merge it? |
We left a TODO to handle the case where a JSON document uses an invalid schemas. I think this should cover that case.
I changed the TestClient to use
@hyperjump/uriinstead ofvscode-uribecause the incorrect normalization it does was causing problems with the tests on windows.