Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a module-info.java #16133

@sgammon

Description

@sgammon

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.

UPDATE: Guava has shipped JPMS.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions