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

Fix gems in gradle 8.7 #726

Merged
merged 4 commits into from
Jul 18, 2024
Merged

Conversation

markslater
Copy link
Contributor

Fixes #725.

I need some guidance on how the maintainers would like to handle one issue:

I've included a change to the test config that demonstrates the original issue with Gradle 8.7, but with the fix, the Gradle 8.7 tests fail for a different reason, which I suspect is caused by this Gradle 8.7 TestKit bug: gradle/gradle#28729. That TestKit bug is fixed in the upcoming Gradle 8.8-RC1.

I've manually tested my change, and confirmed it fixes the issue.

Three options come to mind:

  1. Remove the Gradle 8.7 tests; the existing tests prove this change doesn't break the plugin for previous versions of Gradle.
  2. Wait for Gradle 8.8-RC1.
  3. Wait for Gradle 8.8.

For reference, the test failures are like this:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/gradle/internal/classpath/InstrumentableClosure
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:670)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:652)
Caused by: java.lang.ClassNotFoundException: org.gradle.internal.classpath.InstrumentableClosure
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	... 19 more

> Task :asciidoctor FAILED

…le 8.7 tests, but confirmed to work through manual testing; suspected to be a problem with Test Kit in Gradle 8.7.
…umentation bug that causes spurious test failures.
…ation bug that causes spurious test failures.
@markslater markslater marked this pull request as ready for review June 1, 2024 08:20
@markslater
Copy link
Contributor Author

I've added Gradle 8.8 to the compatibility test matrix to demonstrate the fix.

@dubinsky
Copy link

dubinsky commented Jun 3, 2024

@abelsromero @ysb33r are there any plans to release this so that the plugin could be used with current versions of Gradle? Thank you!

@ysb33r
Copy link
Member

ysb33r commented Jul 18, 2024

@markslater Can you change the target to development-4.x instead of master, please?

@ysb33r
Copy link
Member

ysb33r commented Jul 18, 2024

@markslater Can you change the target to development-4.x instead of master, please?

Never mind. I am going to merge it to master and cherry-pick it back.

@ysb33r ysb33r merged commit 88dded3 into asciidoctor:master Jul 18, 2024
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 this pull request may close these issues.

Gems don't work with Gradle >= 8.7
3 participants