Repository navigation
Conversation
storm-shaded-deps is built with the shade plugin, whose dependency-reduced pom lists jspecify as a compile dependency. A module that resolves it from the local Maven repository sees that pom, so jspecify is copied into lib-worker, and dedup-libs.py moves it to lib-common. In a reactor build, as release:perform does, Maven reads the source pom, where jspecify is only reachable through JUnit as a test dependency, so jspecify stays in lib. The same tag therefore gave two layouts: jspecify in lib/ in the tarball built by release:perform and in lib-common/ in a rebuild from the tag. Declaring jspecify in storm-client-bin, with its version managed in the root pom, gives the same lib-worker in both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…torm-client-bin The shade plugin's dependency-reduced pom promotes the transitive dependencies of the shaded libraries and keeps their optional flag. jspecify was the only one it left non-optional, so a module that resolves storm-shaded-deps from the Maven repository got jspecify on its worker classpath, while a reactor build reading the source pom did not. error_prone_annotations, j2objc-annotations and failureaccess are daemon-only in both. Declare jspecify optional in storm-shaded-deps, like the libraries it sits next to, and drop the dependency this pull request added to storm-client-bin. jspecify is then in lib/ only, whichever way the distribution is built. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 3.2.0 candidate has two binary tarballs built from the same tag, and
jspecify-1.0.1.jarsits inlib/in one and inlib-common/in the other. This makes both give the same layout.Upgrade notes
storm-clientno longer bringsorg.jspecify:jspecifyas a transitive compile dependency (it came through the dependency-reduced pom ofstorm-shaded-deps). If your topology code usesorg.jspecifyannotations, declare the dependency yourself, for exampleorg.jspecify:jspecify:1.0.1.In the binary distribution,
jspecifyis inlib/(daemon classpath) in every build, so it is no longer on the worker classpath. It is an annotations-only library and is not needed at runtime.Details
Cause
storm-shaded-depsbundles its libraries with the shade plugin, and the libraries are declared<optional>true</optional>. The plugin's dependency-reduced pom promotes their transitive dependencies and keeps the optional flag.jspecifyis the only promoted dependency it left non-optional.error_prone_annotations,j2objc-annotationsandfailureaccessare optional or daemon-only in both builds.storm-shaded-depsfrom the Maven repository reads that reduced pom, sojspecifylands on the worker classpath, anddedup-libs.pymoves it tolib-common. In a reactor build, asrelease:performdoes, Maven takes the model ofstorm-shaded-depsfrom the reactor (ReactorReader.findModelreturnsMavenProject.getModel(), checked in the bytecode of Maven 3.9.16), so the reduced pom written by the shade step is never read. That model declares Guava as optional and does not declarejspecify, so the worker classpath does not get it and it stays inlib.Change
org.jspecify:jspecifyas<optional>true</optional>instorm-shaded-deps/pom.xml, like the libraries around it. The version is already managed in the root pom.jspecifythen stays inlib/in every build mode, as the other Guava annotation jars do.Verified on a scratch checkout of the
v3.2.0tag with this change, using an isolated local repository so the real one was not touched:The reduced pom of
storm-shaded-depsnow listsjspecifywithoptional=true.storm-client-binbuilt in a reactor and built on its own:lib-workerhas 39 jars in both, nojspecify, with identical names and SHA-256 hashes. Before the change the standalone build had 40.final-packagedaemon jars (copy-dependencies, runtime): 88 jars in both modes, unchanged from before,jspecifyincluded.Workers without
jspecify: the full 3.2.0 distribution withjspecifymoved fromlib-common/tolib/(the layout this change produces) passed the smoke test (WordCount, Lambda, MultiThreadWordCount and the Kafka example, 0 failed tuples), and no worker log had aNoClassDefFoundErrororClassNotFoundException.jspecifyhas only 4 annotation types, andstorm-clientdoes not reference them.Not verified
branch=line in the version-info files will still differ between any two builds.🤖 Generated with Claude Code