-
Notifications
You must be signed in to change notification settings - Fork 166
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
fix(schema): empty array name #2339
Conversation
WalkthroughOhayo, sensei! The changes involve an update to the handling of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Ty
User->>Ty: Request Type Representation
Ty-->>User: Check if Array is Empty
alt Array is Empty
Ty-->>User: Return "Array"
else Array is Non-Empty
Ty-->>User: Return "Array<Type>"
end
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Additional comments not posted (1)
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 Documentation and Community
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2339 +/- ##
==========================================
- Coverage 67.26% 67.26% -0.01%
==========================================
Files 357 357
Lines 46634 46637 +3
==========================================
+ Hits 31367 31369 +2
- Misses 15267 15268 +1 ☔ View full report in Codecov by Sentry. |
if let Some(inner) = ty.first() { | ||
format!("Array<{}>", inner.name()) | ||
} else { | ||
"Array".to_string() |
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.
How can we have an array without inner type?
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 Ty is also used for values, like for arrays returned from GRPC. So we might have a model with an empty array, which in that case, would panic since we cannot get the inner type due to our array being empty
Summary by CodeRabbit
These changes enhance the user experience by providing more meaningful and accurate type information.