Skip to content
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

ShadowJar failing on records because records requires ASM8 #679

Closed
josephjthomas opened this issue Jun 2, 2021 · 4 comments · Fixed by #681
Closed

ShadowJar failing on records because records requires ASM8 #679

josephjthomas opened this issue Jun 2, 2021 · 4 comments · Fixed by #681

Comments

@josephjthomas
Copy link

josephjthomas commented Jun 2, 2021

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

7.0.0

Gradle Version

7.0.2

Expected Behavior

Bumping ASM to 8 or higher to allow the usage of records in a shadowjar.

Actual Behavior

Build fails with java.lang.UnsupportedOperationException: Records requires ASM8 when using records and compiling with Java 16 targeting Java 16.
Full stacktrace: https://paste.gg/p/anonymous/6a11517d3d4c4f45b0056b70d6bcab05

Gradle Build Script(s)

/

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

We don't get here due failure on the build process.

@josephjthomas
Copy link
Author

Could this be an issue with jdependency? They recently fixed it within version 2.7.0, shadow still uses 2.6.0

jpenilla added a commit to jpenilla/shadow that referenced this issue Jun 7, 2021
Fixes issues with records (closes GradleUp#679)
@jpenilla
Copy link
Contributor

jpenilla commented Jun 7, 2021

Could this be an issue with jdependency? They recently fixed it within version 2.7.0, shadow still uses 2.6.0

Yes, this issue is due to shadow using outdated jdependency. I authored this PR to jdependency and have been using a custom build of shadow with the updated jdependency for my Java 16 projects since then without issue.

@Starmism
Copy link

Just to note for anyone waiting for the PR to be merged, in my case the issue was resolved by not minimizing in shadowJar.

@duplexsystem
Copy link

I'm having this same issue and confirmed #681 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants