-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
feat(biome_cli): add schema version check to check
,lint
,format
commands
#4796
feat(biome_cli): add schema version check to check
,lint
,format
commands
#4796
Conversation
The test action failed as expected because the test was built without the
|
To minimize what our existing tests are asserting for, I think it would be better to change the schema url in the sample config for that test to |
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.
Thank you for your contribution!
While the logic is correct, unfortunately it isn't in the right place. This was a mistake on our parts when we described the issue. The problem is, we described the solution only by focusing on the CLI as our only client, but there are clients like the LSP.
We should place the version check logic when we deserialize the configuration.
So, this is where our configuration is defined
https://github.com/biomejs/biome/blob/main/crates%2Fbiome_configuration%2Fsrc%2Flib.rs#L83-L86
You'll have to create a new type e.g. Schema(String)
, very similar to this code
And then implement a custom deserialization, where you will place the logic you just added. You can check this example
2823a54
to
3c5ccac
Compare
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.
CodSpeed Performance ReportMerging #4796 will not alter performanceComparing Summary
|
Summary
Issue mentioned in #4147
Add function
check_schema_version
which will compare version and print warning information.Test Plan
check
,format
, andlint
commands.