Skip to content

Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR #3799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 27, 2025

Conversation

dondonz
Copy link
Member

@dondonz dondonz commented Jan 23, 2025

This PR adds back the new Shadow plugin ID and a fix for the original problem, a clash with ByteBuddy's multi-release JAR.

Background

A few days ago I merged in a seemingly small change to update the Shadow plugin's ID, reflecting the new owner of the plugin after the previous maintainer handed it over. #3791 GitHub thread explaining ownership change: GradleUp/shadow#908

The PR with this update had a passing build and everything seemed fine, until 2 days later, all new PRs had failing builds with a mysterious error only on the Agent's shadowJar task, complaining about "Unsupported class file major version 68". Example failing pipeline: https://github.com/graphql-java/graphql-java/actions/runs/12934658930/job/36076178664

Java version 68 corresponds to Java 24 which was very strange, because we only use Java 11 in this repo and Java 24 is so brand new, the release date is in the future! (March 2025)

I reverted these changes to unblock other PRs. #3800

This PR fixes the clash with ByteBuddy's multi-release JAR

In between the first Shadow PR merge and the PRs failing was an innocent looking update for ByteBuddy, which we use in the Agent module only, not the main GraphQL Java release. Updating this library from 1.15.11 to 1.16.0 is the cause of the problem.

I did some more digging and found other people had the same problem with Jackson, another multi-release JAR project that some people shade. FasterXML/jackson-core#1210.

I did try only including Java 11 files but that causes an issue with Agent tests. For now, let's downgrade ByteBuddy.

ByteBuddy PR introducing multi-release JAR: https://github.com/raphw/byte-buddy/pull/1719/files

Copy link
Contributor

github-actions bot commented Jan 23, 2025

Test Results

  306 files    306 suites   47s ⏱️
3 483 tests 3 478 ✅ 5 💤 0 ❌
3 572 runs  3 567 ✅ 5 💤 0 ❌

Results for commit 542c641.

♻️ This comment has been updated with latest results.

@dondonz dondonz changed the title Update agent's shadow plugin to new namespace WIP Update agent's shadow plugin to new namespace Jan 25, 2025
@dondonz dondonz changed the title WIP Update agent's shadow plugin to new namespace Shadow namespace change take 2 - fixing clashing ByteBuddy version Jan 27, 2025
@dondonz dondonz added the not release related changes which are not released (for example unit tests or docs) label Jan 27, 2025
@dondonz dondonz added this to the 23.x breaking changes milestone Jan 27, 2025
@dondonz dondonz changed the title Shadow namespace change take 2 - fixing clashing ByteBuddy version WIP Shadow namespace change take 2 - fixing clashing ByteBuddy version Jan 27, 2025
@dondonz dondonz changed the title WIP Shadow namespace change take 2 - fixing clashing ByteBuddy version Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR Jan 27, 2025
@dondonz dondonz changed the title Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR WIP Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR Jan 27, 2025
@dondonz dondonz changed the title WIP Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR Shadow plugin ID update Round 2 - fix clash with ByteBuddy's multi-release JAR Jan 27, 2025
@dondonz dondonz merged commit b65ac41 into master Jan 27, 2025
2 checks passed
@dondonz dondonz deleted the update-shadow-in-agent branch January 27, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not release related changes which are not released (for example unit tests or docs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants