-
Notifications
You must be signed in to change notification settings - Fork 599
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: message_as_jsonb
to handle circle dep in protobuf (#19935)
#19992
Conversation
Co-authored-by: tabversion <[email protected]>
resolve #19986 |
@@ -91,10 +104,12 @@ fn detect_loop_and_push( | |||
let identifier = format!("{}({})", fd.name(), fd.full_name()); | |||
if trace.iter().any(|s| s == identifier.as_str()) { | |||
bail_protobuf_type_error!( | |||
"circular reference detected: {}, conflict with {}, kind {:?}", | |||
"circular reference detected: {}, conflict with {}, kind {:?}. Adding {:?} to {:?} may help.", |
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 error message suggests adding fd.kind()
to messages_as_jsonb
, but this is incorrect since messages_as_jsonb
expects full message type names. The message should suggest adding fd.descriptor().full_name()
instead to properly guide users on how to resolve circular reference errors.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
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.
For a proto message, printing kind equals the full name.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
Documentation
Release note