Skip to content
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 regression in regenerating protobuf source #8603

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

Closes #8602

Rationale for this change

Fix regression in generating protobuf source with protobuf 3.12, which is the recommended version in the documentation.

What changes are included in this PR?

Remove redundant optional keyword.

Are these changes tested?

Existing tests.

Are there any user-facing changes?

@andygrove andygrove requested a review from alamb December 20, 2023 16:36
@andygrove
Copy link
Member Author

@alamb The use of the optional keyword seems nicer, but this was the only place that we were using it, so it seems better to remove it and make it consistent with the rest of the file for now? The alternative is updating docs to require the use of a newer version of protoc, but I am not sure of the impact of that on downstream projects.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andygrove

@@ -1338,7 +1338,11 @@ pub fn parse_expr(
in_list.negated,
))),
ExprType::Wildcard(protobuf::Wildcard { qualifier }) => Ok(Expr::Wildcard {
qualifier: qualifier.clone(),
qualifier: if qualifier.is_empty() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine -- I don't think an empty string "" is a valid qualifier anyways so not being able to distinguish between "" and None is not important

@andygrove andygrove merged commit bc013fc into apache:main Dec 20, 2023
22 checks passed
@andygrove andygrove deleted the fix-proto-gen branch December 20, 2023 22:49
@edmondop
Copy link
Contributor

@alamb The use of the optional keyword seems nicer, but this was the only place that we were using it, so it seems better to remove it and make it consistent with the rest of the file for now? The alternative is updating docs to require the use of a newer version of protoc, but I am not sure of the impact of that on downstream projects.

Sorry for the late comment. I think it would be great if we align the version in the docs with the version used by CI/CD pipeline. Will submit a PR later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot regenerate protobuf source code using instructions in the documentation
3 participants