protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.49k stars 15.46k forks source link

Add a `module-info.java` #16133

Open sgammon opened 7 months ago

sgammon commented 7 months ago

What language does this apply to? If it's a proto syntax change, is it for proto2 or proto3? N/A If it's about generated code change, what programming language? Java

Describe the problem you are trying to solve. I want to use Protobuf Java with jlink. Unfortunately, jlink rejects JARs with an Automatic-Module-Name set; it is required to define a module-info.java.

Describe the solution you'd like I would like Protobuf Java to ship a module-info.java, in an MRJAR, to preserve existing JDK support. I am not proposing a change to the JVM bytecode minimum support level.

Describe alternatives you've considered I have considered solutions like Moditect, but they complicate my build greatly because dependencies must be transformed before being consumed by the Java Compiler.

Additional context Guava is considering a PR for this. Recently, Error Prone and other core libs have released new versions with a module-info.java definition. Thus, Protobuf's transitive dependencies may be ready for a fully modular Java build.

github-actions[bot] commented 4 months ago

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

sgammon commented 4 months ago

Bump!

odinsbane commented 3 months ago

I don't understand why this can't be done. It seems like jlink is a great way to create a stand alone app, but we cannot use protobuf with it.

vietj commented 3 months ago

We are willing to help on this effort, we would like very much to have JPMS support for Google Protobuf library

github-actions[bot] commented 3 days ago

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.