-
Notifications
You must be signed in to change notification settings - Fork 734
bazel: Switch over to clang-22 #30012
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
Changes from all commits
ce09779
e007b06
29978ac
efb2171
c0ac70c
e66402a
043416b
c91dd7f
ef3fac5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,11 +41,12 @@ constexpr std::string_view schema_def = R"({ | |
|
|
||
| int main() { | ||
| sr_client = sr::new_client(); | ||
| if (auto res = sr_client->create_schema( | ||
| "avro-value", | ||
| sr::schema::new_avro( | ||
| std::string{schema_def.data(), schema_def.size()})); | ||
| !res.has_value()) { | ||
| if ( | ||
| auto res = sr_client->create_schema( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just odd, isn't it. Let me see whether one can disable.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems kinda unfortunate that upgrading clang-format causes so much churn. are they "bugs" or just defaults changing and we can tweek our config? either way, no big deal.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are config. But it seems for this specifically it was inconsistent before so you get diffs either way. I don't care which way we go. I'll leave default unless I hear otherwise.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
got it so like formatting "bugs" so yeh it makes sense then to accept all the churn?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes but they result in tens of thousands of line changes.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I mean if we can make this less painful in the future I think it's worth it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really see what's painful about it right now but I also don't really see how we can avoid it. The "problem" is that they are adding new flags for underspecified behaviour I think. So you can add explicit values for everything right now that still won't prevent future flags from causing changes.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with @StephanDollberg here, it looks like they switching from a heuristic (penalty) based breaking for these examples to more binary options which will always break after
I don't think that's the case: we are just choosing between two different styles now, no reason to believe the other one will have less churn in the future. So I would vote for what we have now as the low churn option unless there is a very concrete reason we like the other way better. |
||
| "avro-value", | ||
| sr::schema::new_avro( | ||
| std::string{schema_def.data(), schema_def.size()})); | ||
| !res.has_value()) { | ||
| return 0; | ||
| } | ||
| redpanda::on_record_written(do_transform); | ||
|
|
@@ -67,8 +68,9 @@ do_transform(redpanda::write_event event, redpanda::record_writer* writer) { | |
| return id_e.error(); | ||
| } | ||
| std::optional<sr::schema> raw_schema; | ||
| if (auto rs_e = sr_client->lookup_schema_by_id(id.value()); | ||
| rs_e.has_value()) { | ||
| if ( | ||
| auto rs_e = sr_client->lookup_schema_by_id(id.value()); | ||
| rs_e.has_value()) { | ||
| raw_schema.emplace(std::move(rs_e).value()); | ||
| } else { | ||
| return rs_e.error(); | ||
|
|
@@ -77,17 +79,19 @@ do_transform(redpanda::write_event event, redpanda::record_writer* writer) { | |
| // auto schema = avro::schema::parse_str(raw_schema.value().schema()); | ||
|
|
||
| std::optional<sr::subject_schema> latest_schema; | ||
| if (auto latest_e = sr_client->lookup_latest_schema("avro-value"); | ||
| latest_e.has_value()) { | ||
| if ( | ||
| auto latest_e = sr_client->lookup_latest_schema("avro-value"); | ||
| latest_e.has_value()) { | ||
| latest_schema.emplace(std::move(latest_e).value()); | ||
| } else { | ||
| return latest_e.error(); | ||
| } | ||
|
|
||
| std::optional<sr::subject_schema> latest_direct; | ||
| if (auto latest_e = sr_client->lookup_schema_by_version( | ||
| "avro-value", latest_schema->version); | ||
| latest_e.has_value()) { | ||
| if ( | ||
| auto latest_e = sr_client->lookup_schema_by_version( | ||
| "avro-value", latest_schema->version); | ||
| latest_e.has_value()) { | ||
| latest_direct.emplace(std::move(latest_e).value()); | ||
| } else { | ||
| return latest_e.error(); | ||
|
|
||


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.
I have a feeling there is a better way to fix this, but shouldn't block this PR