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

Protobuf release artifacts do not include language-specific features protos #16211

Closed
jhump opened this issue Mar 18, 2024 · 5 comments
Closed

Comments

@jhump
Copy link
Contributor

jhump commented Mar 18, 2024

The release artifacts for v26.0 do not include the protos for controlling language specific features. The repo includes google/protobuf/cpp_features.proto and google/protobuf/java_features.proto (though the latter is a bit buried, actually in java/core/src/main/java/com/google/protobuf). And the Editions docs reference these two files. But the actual distribution does not include them:

~/protoc-26.0> find include 
include
include/google
include/google/protobuf
include/google/protobuf/timestamp.proto
include/google/protobuf/field_mask.proto
include/google/protobuf/api.proto
include/google/protobuf/duration.proto
include/google/protobuf/struct.proto
include/google/protobuf/wrappers.proto
include/google/protobuf/source_context.proto
include/google/protobuf/any.proto
include/google/protobuf/type.proto
include/google/protobuf/empty.proto
include/google/protobuf/compiler
include/google/protobuf/compiler/plugin.proto
include/google/protobuf/descriptor.proto

Is this a mistake? If not, how are users intended to obtain these files in order to import them from their own proto sources?

@jhump jhump added the untriaged auto added to all issues by default when created. label Mar 18, 2024
@zhangskz zhangskz added packaging & distribution 26.x editions and removed untriaged auto added to all issues by default when created. labels Mar 19, 2024
@zhangskz zhangskz assigned zhangskz and mkruskal-google and unassigned zhangskz Mar 19, 2024
@mkruskal-google
Copy link
Member

This is a bug assuming you got these results by installing protoc and the C++ runtime. We should be shipping features protos with the corresponding runtime, so you should see cpp_features.proto here. Java features are separately put in the wrong place (see #16155)

@jhump
Copy link
Contributor Author

jhump commented Mar 19, 2024

This is a bug assuming you got these results by installing protoc and the C++ runtime.

I just downloaded the relevant artifact for my machine from the "Artifacts" section, at the bottom of the GitHub release.

So if I download the Java runtime, I'm expected to manually unpack the proto source from that JAR and put that directory in my include path? Why not include it with the other standard include files? If that location in the runtime JAR is easily consumed from a code gen task in Maven or Gradle, what about if I'm using the same proto and doing code gen for many languages, and need access to all of the features from a single file? Then I need the Java features source file, even for generating C++, since the source file imports it.

@mkruskal-google
Copy link
Member

yea that's a good point, maybe we should include all of these from our GH artifacts

@mkruskal-google
Copy link
Member

The major problem I see is that we're also shipping these protos and their gencode with our runtime releases. So there's a concern about version skew if we release them to two different places

@jhump
Copy link
Contributor Author

jhump commented Mar 21, 2024

So there's a concern about version skew if we release them to two different places

How are they different from descriptor.proto and plugin.proto (where gencode is also shipped with most runtime releases)? Is it just that they are expected to change/evolve more frequently/quickly than those files?

copybara-service bot pushed a commit that referenced this issue Mar 25, 2024
…r Java and C++

Fixes #16211

PiperOrigin-RevId: 618933090
copybara-service bot pushed a commit that referenced this issue Mar 25, 2024
…r Java and C++

Fixes #16211

PiperOrigin-RevId: 618933090
copybara-service bot pushed a commit that referenced this issue Mar 25, 2024
…r Java and C++

Fixes #16211

PiperOrigin-RevId: 618933090
zhangskz added a commit that referenced this issue Mar 26, 2024
…r Java and C++

Fixes #16211

PiperOrigin-RevId: 618954029
elvisdukaj pushed a commit to elvisdukaj/protobuf that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants