-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
jackson-core:2.15.0-rc1 causes Gradle (pre-7.6) build failure #955
Comments
This has nothing to do with jackson - try cleaning your gradle cache. Even just delete that Gradle can always hit issues with this, caching internet files is hard to get right - you cannot guarantee 100% success with downloading files. |
I have the same problem when using
I think some classes do NOT work well with JDK17. |
Have you tried downloading the reproducing project? this is not a cache issue but rather a JDK version issues as mentioned in the comment above. Something not working properly with the multi release jar |
so does upgrading Gradle help? Original comment suggests that using Gradle 7.6.1 helps. |
So far, it looks like old versions of Gradle use an old version of asm and tries to analyse META-INF/versions classes that it shouldn't. It seems newer versions of Gradle have fixed the issue. Please use newer versions of Gradle (7.6.1 and 8.0.2 do not hit the issue in the sample). |
upgrading Gradle does eliminate the issue, but my project is constrained and cannot upgrade the Gradle version |
So don't upgrade jackson then. There is no real constraint not to update - just some management issue that is not my concern. |
I am concerned: if 2.15 does not work with relatively recent Gradle versions, we do have a problem. Unfortunately I don't have enough Gradle knowledge to know what might be happening here, or how to help. I wouldn't want to start removing classes for later JDKs, but that seems like it might be one option. |
This is a bug in Gradle - gradle/gradle#24390
If the Jackson team are to worry about old versions of Gradle, I really don't know where to go.
I don't know if Gradle team will look at gradle/gradle#24390 - it's possible that they will backport the Gradle 7.6 fix - but I suspect it is unlikely. I must admit to being reluctant to volunteer time on this. I feel strongly that this is a bug in Gradle and one that has been fixed to boot. |
Ok. Did not realize it's a bona fide bug in gradle, only surprised it'd be present in a relatively recent version. My concern is simply this: Jackson is Java 8 compatible so it has to work with Java 8 tools, in general. Not every version everywhere of course. But maybe this is not the case -- I might be seeing catastrophe where there isn't one. If we had someone who could test this, I'd probably consider stripping out of JDK 19 support if that would work around issues for Java 17. I guess the biggest question really is "how big a problem is this" wrt users -- is it for all JDKs pre-19, for Gradle 7.6 or before? Specific Gradle version? Just some JDKs? (wrt which versions gradle woud peek to). |
I'm guessing but it is most likely that it is the META-INF/versions/19 files as opposed to all META-INF/versions files. |
Gradle 7.6 - where everything works - is the 1st to support Java 19 according to https://docs.gradle.org/7.6/release-notes.html |
@pjfanning I wonder what are the constraints for earlier JDKs; I guess old enough tool versions might actually simply ignore version-specific class files and maybe not be affected at all (ironically enough). |
The issue is that Gradle's asm jar needs to be upgraded every time there is a new Java release. I wish they would be able to code defensively around ignoring META-INF/version/X classes that are too new for their asm jar. |
I agree with your comments including the below. |
@pjfanning Fully agree wrt forward-compatibility, not barfing on foreseeable issues. Although it's easier said than done of course. |
@cowtowncoder can we close this based on gradle/gradle#24390 (comment) ? |
@pjfanning Was wondering about same thing. I guess it'd be great to update title/description to clarify that this does not affect builds where |
Resolution: if affected, upgrade to Gradle 7.6.1 or later. Closing. |
This requires (temporarily?) removing the Gradle linter plugin we use due to some mysterious incompatibility that I don't understand, however it fixes the issue with Jackson dependencies that we were seeing similarly to FasterXML/jackson-core#955
This requires (temporarily?) removing the Gradle linter plugin we use due to some mysterious incompatibility that I don't understand, however it fixes the issue with Jackson dependencies that we were seeing similarly to FasterXML/jackson-core#955
Downstream we have engineers that have run into FasterXML/jackson-core#955 and gradle/gradle#24390 (despite Gradle 7.6.1). Downgrading works around these issues until a new Gradle version that works is published.
This fixes FasterXML/jackson-core#955 when building via GitHub Actions.
This is needed to use Jib 3.4.0, because of [1] [1] FasterXML/jackson-core#955
The same issue with gradle:8.2.0 and jackson-core-2.15.0.jar Unsupported class file major version 63 |
Solved also in 7.6.4 |
When
com.fasterxml.jackson.core:jackson-core:2.15.0-rc1
is in the buildscript dependencies it fails to write locks.Expected Behavior
Build should succeed
Current Behavior
Build fails with the error
Steps to Reproduce
Clone this repo and run
./gradlew build
Additional notes:
2.15.0-rc1
ofjackson-core
introduces a multi-release jar [link to release notes], which is likely the reason why this error occurs on this particular version and not earlier versions.Gradle 7.4 fails on multi release jar's with JDK 19 code gradle/gradle#24390
The text was updated successfully, but these errors were encountered: