apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.24k stars 3.47k forks source link

[Java] Do not publish modules based on filenames #43227

Open danepitkin opened 1 month ago

danepitkin commented 1 month ago

Describe the bug, including details regarding any error messages, version, and platform.

Arrow Java should not publish modules based on filenames. Flatbuffers/Protobuf can probably be shaded to avoid this. We can potentially remove usage of jsr305 in favor of another library.

[WARNING] * Required filename-based automodules detected: [flatbuffers-java-24.3.25.jar, jsr305-3.0.2.jar, protobuf-java-3.25.1.jar, protobuf-java-util-3.25.1.jar]. Please don't publish this project to a public artifact repository! *

Component(s)

Java

laurentgo commented 1 month ago

Shading is not playing nice with JPMS either.

For flatbuffers, there's a request to add an automatic-module name to the library ~For protobuf, it seems like it was done long time ago but the manifest doesn't have the actual entry, so I suspect that the jars have been generated with bazel at some points and are now missing those bits since~. Issue was fixed as part of protobuf 26.0 As for jsr305, maybe it should be replaced with jspecify

danepitkin commented 1 month ago

Thank you for looking into this! I'll push on the flatbuffers PR to see if we can get it landed since that seems to be the only good solution we have.