/proto-java

Demonstration for https://github.com/protocolbuffers/protobuf/issues/8925

Primary LanguageStarlarkApache License 2.0Apache-2.0

Java Protobuf Dependencies

Table of Contents

Purpose

Demonstrates duplicate class files added by java_proto_library.

Running

Install bazelisk, then run

bazelisk run //:main

or

bazelisk run //:mainlite

Impact

Containers build with java_image are affected, test with:

bazel run //:container

This needs a local docker installation. Otherwise, just retrieve the list of relevant files with:

bazel build //:container
tar tvf "$(bazel info bazel-bin)/src/main/java/com/example/container-layer.tar"
tar xOf "$(bazel info bazel-bin)/src/main/java/com/example/container-layer.tar" \
  ./app/com_example_proto_java/src/main/java/com/example/container.classpath | tr : \\n

Diagnose

Seems to be introduced by protocolbuffers/protobuf#89a9f459

Applying 8925.patch in WORKSPACE eliminates the problem, as does reverting to 3.17.3.