pburka opened a new issue, #29881: URL: https://github.com/apache/beam/issues/29881
### What happened? Several Beam 2.52.0 jars (as downloaded from maven) include unshaded classes copied from other projects. For example, `beam-sdks-java-transform-service-launcher-2.52.0.jar` includes annotation classes that appear to have been copied from old versions of error-prone and checker-qual, e.g. `com.google.errorprone.annotations.CanIgnoreReturnValue` and `org.checkerframework.checker.builder.qual.CalledMethods`. When this jar appears on the classpath, it can shadow the actual error-prone and checker-qual jars, potentially causing compilation errors in user code. Similarly, `beam-sdks-java-harness-2.52.0.jar` includes classes copied from outdated versions of JUnit and Hamcrest. It's unclear why this jar would need to vendor unit testing classes. The same jar appear to also include a near(?)-complete copy of classgraph. Most confusingly, `beam-runners-direct-java-2.52.0.jar` appears to include duplicates of most or all of the classes from `beam-sdks-java-extensions-avro-2.52.0.jar`, but not exactly the same classes, as the classfile CRCs differ. It's not at all clear why one Beam jar needs classes vendored from another jar within the same project. I suspect the copied annotation classes aren't needed in the jars at all--anyone using error-prone or checker-qual can provide their own jar explicitly and it should be relatively harmless to compile against the jar with the annotation classes missing completely. (Although some non-Java compilers such as scalac may not handle this as well as javac.) The other classes should be provided as dependencies, allowing users to upgrade them, if necessary, and avoiding confusing errors caused by shadowing. These copied classes appear to have been introduced sometime after version 2.37.0, which did not have these copied classes. This may be related to [Issue 19846](https://github.com/apache/beam/issues/19846) ### Issue Priority Priority: 2 (default / most bugs should be filed as P2) ### Issue Components - [ ] Component: Python SDK - [X] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [ ] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Samza Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
