Change:
A side effect of the schema optimisation work done via is a degradation of intellisense and error reporting for In particular the following areas are affected: unknown properties are not flagged as errors, preLaunchTask: when using a structured preLaunchTask (instead of just the name of a task), there is no intellisense/error reporting for the task attributes (IIRC structured preLaunchTasks should only allow something like: ), there might be more...
The first issue is a missing "additionalProperties=false". The second, I can't figure out. In OSS, I get the correct intellisense and errors for preLaunchTask. In insiders with no extensions/fresh user data dir, I don't. But when I copy the full schema from inside vscode into a json file and reference it with in the , then it works. any idea what would be going on there?
For the first part I will have to restructure the allOf section and redeclare properties, as in https://json- But there is a new property that would help, which our JSON validation hasn't implemented: https://json-
any chance that VS Code will support ?
I can look at it for May:
That would be awesome!
Even without , from my understanding, I only have to add the 3 OS properties to each config. They still use a $ref so it's not redeclaring every single property. The one I can't figure out is why the preLaunchTask schema isn't working in Insiders (with no extensions) but is in OSS. I pull in the task schema here:
any idea why a schema works in OSS but not in Insiders?
No idea. How can I reproduce?
could you please add steps?
Add , trigger intellisense inside, I get no suggestions. Add , I don't get an error about the unknown property
Here's what I see in the latest insiders: (1.67.0-insider, commit: ) open in the vscode repo on main In the first configuration add a ! ! Also when running from sources: ! I think what's special here is that preLaunchTask is a many variants. Each variant has a different (, , ...). Until is defined, it feels random which variant is picked by the JSON language service and which properties are proposed. For the best user experience, IMO 'preLaunchTask` has default snippets for each type. So instead of ! there's a proposal for each type. That way the user select4s a type early and the completions make sense
Weird, still doesn't work for me: ! This is in a totally clean insiders window, fresh user data dir, empty extensions dir. No completions at all inside preLaunchTask.
In the status line, can you click on the next to JSON, select and open the schema. Copy the schema to a new empty editor. Maybe a syntax error in the schema?
I didn't know about that - have been copying the schema out of the debugger which is hard. Ended up with this somehow: so I think that this returns an empty . I notice that it caches the result, so maybe in my Insiders it's being called before the task types are registered. If that list of contributions changes, the launch schema won't get the new options.
I tried this out and I'm seeing 10 elements in the . Does this happen every time for you?
Yes, but I think it depends on how early is first called. I have a lot of extensions installed, something must be different.
is now supported by the JSON language service.
great, thanks a lot!
I'm not sure I understand what is needed from the tasks side. Should we add an event that fires when the schema changes?
I'm pretty sure that getJsonSchema is caching an incomplete value and returning that even after more registrations have happened I need that to return the real latest value. There is already an event for change although I'm not listening to it right now

Discussion:
this.taskTypes = Object.create(null); this.readyPromise = new Promise<void>((resolve, reject) => { taskDefinitionsExtPoint.setHandler((extensions, delta) => { <ins> this._schema = undefined; </ins> try { for (let extension of delta.removed) { let taskTypes = extension.value;