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

Fixes #3259: Prepare to upgrade to Protobuf 4. #3260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MMcM
Copy link
Collaborator

@MMcM MMcM commented Mar 19, 2025

Address some small incompatibilities between Protobuf 3 and Protobuf 4, attempting to have code that will compile against both.

  • Descriptors.FileDescriptor.getSyntax, which was deprecated, is now removed. Use DescriptorProtos.FileDescriptorProto.getSyntax.
  • TextFormat.shortDebugString is deprecated. Remove newlines manually for now (only in test failure codepath).
  • guava is no longer a transitive dependency; add it explicitly where needed.

Address some small incompatibilities between Protobuf 3 and Protobuf 4, attempting to have code that will compile against both.
* `Descriptors.FileDescriptor.getSyntax`, which was deprecated, is now removed. Use `DescriptorProtos.FileDescriptorProto.getSyntax`.
* `TextFormat.shortDebugString` is deprecated. Remove newlines manually for now (only in test failure codepath).
* guava is no longer a transitive dependency; add it explicitly where needed.
@MMcM MMcM added the build improvement Improvement to the build system label Mar 19, 2025
@alecgrieser
Copy link
Collaborator

See also #3258. That one seems to hit a problem where the syntax field isn't picked up correctly in the file descriptor, and I'm not sure what we'd want to do about it

@MMcM
Copy link
Collaborator Author

MMcM commented Mar 19, 2025

#3261 seems to have passed tests; is that unexpected based on the other one? Is nestedProto2ToProto3 flaky now?

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

Successfully merging this pull request may close these issues.

2 participants