-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
task: make TaskDefinition
required
optional
#10015
Conversation
ccb1d68
to
5dddbca
Compare
5dddbca
to
4c854ba
Compare
dbed5c4
to
fdc232e
Compare
dcb7ec7
to
fc6c317
Compare
fc6c317
to
9269ad5
Compare
The commit makes `TaskDefinition.properties.required` optional based on the json schema validation definition. Previously, if an extension defines a schema that omits the `required` property the application will throw errors and fail to display the menu. The change treats the missing `required` property as an empty array as per the spec. Signed-off-by: vince-fugnitto <[email protected]>
9269ad5
to
dde9213
Compare
@tsmaeder any objections? |
@vince-fugnitto which schema are we using? https://code.visualstudio.com/api/references/contribution-points#contributes.taskDefinitions seems to indicate that the field is required. Do we have real cases of extensions that fail because of this? Not objecting to be more lenient than the json schema in what we accept, though. |
@tsmaeder I initially started working on the issue after noticing errors in the console when using I believe a real-world example is In addition, vscode declares the schema like so, so I thought we should be more robust as not to have such errors: |
So the documentation is lying ;-) Merge away! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM code-wise.
What it does
Fixes: #10014
The commit makes
TaskDefinition.properties.required
optional based on the json schema validation definition. Previously, if an extension defines a schema that omits therequired
property the application will throw errors and fail to display the menu. The change treats the missingrequired
property as an empty array as per the spec.How to test
required
property #10014Review checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]