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

chore: avoid generating protobuf(proto-google-common-protos) protobufs every time #734

Closed
wants to merge 1 commit into from

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented Jun 6, 2024

protobuf(...) causes protoc to generate code for the listed proto files compileProtoPath adds the listed artifacts on the "include path", so we can reference third-party definitions and generate code for our proto files only.

Note: com.google.protobuf searches both compileProtoPath and implementation dependencies for .proto files.
io.grpc:grpc-protobuf already depends on proto-google-common-protos, so the build would work even without explicit dependency. However, we import google/api protos, so it would be nice to explicitly mention the used dependencies even though they are present as transitive.

…s every time

protobuf(...) causes protoc to generate code for the listed proto files
compileProtoPath adds the listed artifacts on the "include path", so we
can reference third-party definitions and generate code for our proto files only.

Note: com.google.protobuf searches both compileProtoPath and implementation
dependencies for .proto files.
io.grpc:grpc-protobuf already depends on proto-google-common-protos,
so the build would work even without explicit dependency.
However, we import google/api protos, so it would be nice to explicitly mention
the used dependencies even though they are present as transitive.

Signed-off-by: Vladimir Sitnikov <[email protected]>
@vlsi
Copy link
Collaborator Author

vlsi commented Jun 6, 2024

I guess the reason for the failure is that proto-google-common-protos builds using an old protoc version.
We use 4.26.1 for sigstore-java, and api-commons-protos seem to use 3.14.0: https://github.com/googleapis/api-common-protos/blob/3332dec527759859840a3a2ff108c67a54708130/Dockerfile#L7

@loosebazooka
Copy link
Member

gonna close this for now -- I was informed of this issue that might the be underlying problem: protocolbuffers/protobuf#17247

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.

2 participants