-
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
Optional schema validation #11189
Optional schema validation #11189
Conversation
@kittaakos I'm alright with having an option to disable schema validation, but having it behind an overridable method seems overengineered for me. What do you think about a frontend config option instead? |
Thank you!
Sure. Do you mean |
Yes exactly. It allows downstream users to easier disable those validations, since the json can be easily modified during the build process. Having something like this locked behind code basically only allows manual manipulation, which is then app-wide. |
The time savings here are substantial. In my comparison runs, 3.8ms was spent in |
163af76
to
bbb2fd1
Compare
Thank you for the feedback. I updated the PR. Please review. |
packages/core/src/browser/preferences/preference-contribution.ts
Outdated
Show resolved
Hide resolved
It costs time at startup and it only logs warnings. Can be disabled with the `validatePreferencesSchema` fronted app config. Signed-off-by: Akos Kitta <[email protected]>
bbb2fd1
to
43456de
Compare
Please review. |
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.
The changes look good to me! Don't forget to revert your test commit before merging 👍
Do you want me to drop the examples customization? |
@kittaakos Yes, more specifically 43456de, after all we want to have validations for our example app (for us to able to test that the validation works as expected) |
43456de
to
22e0e54
Compare
Could you please merge if all looks good? Thank you! |
@kittaakos, it looks like you still have committer's rights, so you're welcome to do merges yourself, once a PR is approved. |
No, I do not have it 😊 The Eclipse page is misleading. But anyway, thanks for checking it and chiming in for the PR. |
Ref: eclipse-theia/theia#11189 Signed-off-by: Akos Kitta <[email protected]>
Ref: eclipse-theia/theia#11189 Signed-off-by: Akos Kitta <[email protected]>
Ref: eclipse-theia/theia#11189 Signed-off-by: Akos Kitta <[email protected]>
What it does
Made the preference schema validation optional.
shouldValidateSchema
preference config.This PR contains a commit with an example. I can drop the example commit from the PR.
How to test
Start the app, and you will see these in the log:
Please review. Thank you! 🌻
Review checklist
Reminder for reviewers