-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Minor language server fixes #1013
Conversation
WalkthroughThe recent updates focus on enhancing schema validation and attribute flexibility within a development package. Modifications include refining import path handling, extending attribute parameters in the standard library model, and introducing new test scenarios for attribute and schema validation. These changes collectively aim to improve the robustness and adaptability of schema-related functionalities. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
packages/schema/src/language-server/validator/schema-validator.ts
Outdated
Show resolved
Hide resolved
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (4)
- packages/schema/src/language-server/validator/schema-validator.ts (1 hunks)
- packages/schema/src/res/stdlib.zmodel (2 hunks)
- packages/schema/tests/schema/validation/attribute-validation.test.ts (2 hunks)
- packages/schema/tests/schema/validation/schema-validation.test.ts (1 hunks)
Additional comments: 5
packages/schema/tests/schema/validation/schema-validation.test.ts (1)
- 42-54: The addition of the test case 'not existing import with extension' is a valuable enhancement to the test suite. It ensures that the schema validation correctly handles cases where an import statement references a non-existent file with a specific extension. This is crucial for maintaining the robustness of the schema validation process.
packages/schema/src/res/stdlib.zmodel (2)
- 393-393: The addition of an optional
map
parameter to the@@fulltext
attribute enhances its configurability and utility, allowing for more nuanced data modeling. This change aligns well with the goals of expanding attribute flexibility.- 482-482: Introducing an optional
x
parameter of typeInt
to the@db.VarBinary
attribute increases its flexibility, enabling more precise control over binary data handling in the database. This is a valuable enhancement to the attribute's functionality.packages/schema/tests/schema/validation/attribute-validation.test.ts (2)
- 229-246: The addition of models A and B with
@@fulltext
directives is a good enhancement for testing full-text search capabilities. However, ensure that themap
parameter in model B's@@fulltext
directive is correctly implemented and tested in the corresponding database schema. This parameter should alter the name or configuration of the full-text index in the database.- 374-374: The introduction of the
_varBinarySized
field with a@db.VarBinary(100)
directive in the_Bytes
model is a valuable addition for testing binary data handling with a specified size. It's important to verify that the database schema correctly supports and enforces this size constraint for theVarBinary
data type. Additionally, consider adding explicit tests to validate that the size constraint is respected and that data exceeding this size triggers appropriate validation errors.
packages/schema/src/language-server/validator/schema-validator.ts
Outdated
Show resolved
Hide resolved
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/schema/src/language-server/validator/schema-validator.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/schema/src/language-server/validator/schema-validator.ts
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 @Ustice ! The changes look good to me.
Just a couple of errors that I found in the language-server validation. See comments for details.
Summary by CodeRabbit
@@fulltext
and@db.VarBinary
.