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

Use separate URLClassPath targets depending on the JDK version #5335 #5336

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

galderz
Copy link
Member

@galderz galderz commented Nov 8, 2019

Thx @bobmcwhirter for pointers 😃

gastaldi
gastaldi previously approved these changes Nov 8, 2019
@gastaldi gastaldi dismissed their stale review November 8, 2019 16:23

Build failed

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build Failed:

Error: substitution target for io.quarkus.vertx.core.runtime.graal.Target_jdk_internal_loader_URLClassPath$FileLoader is not loaded. Use field `onlyWith` in the `TargetClass` annotation to make substitution only active when needed.
com.oracle.svm.core.util.UserError$UserException: substitution target for io.quarkus.vertx.core.runtime.graal.Target_jdk_internal_loader_URLClassPath$FileLoader is not loaded. Use field `onlyWith` in the `TargetClass` annotation to make substitution only active when needed.
	at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:823)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:252)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:230)
	at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:875)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:824)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:524)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444)
	at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Image build request failed with exit status 1

See comment above

@bobmcwhirter
Copy link
Contributor

Or use the classNameProvider annotation field https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/annotate/TargetClass.java#L103 if the substitution is identical between JDK9 and JDK11, and only the name/package of the class differs.

@gwenneg
Copy link
Member

gwenneg commented Nov 10, 2019

This PR fixes #5335, right?

@galderz
Copy link
Member Author

galderz commented Nov 12, 2019

@gwenneg Indeed it fixes it (or tries to), the commit contains that github issue id :)

@bobmcwhirter's suggestion seems better, I'll update the fix.

@galderz
Copy link
Member Author

galderz commented Nov 12, 2019

Pushed an update. Note that URLClassPath still has different classes because getLookupCache method only exists in the Java 8 (or earlier) version.

@gastaldi
Copy link
Contributor

Looks good now. Can you squash into a single commit?

@galderz
Copy link
Member Author

galderz commented Nov 12, 2019

@gastaldi Was waiting for CI to finish first, is that Ok?

@galderz
Copy link
Member Author

galderz commented Nov 13, 2019

CI passed, can we integrate this?

@gastaldi
Copy link
Contributor

@galderz sure, please squash the commits and I'll merge it. Thanks!

@galderz galderz force-pushed the t_urlclasspath_5335 branch from 79a64dd to 784bce9 Compare November 14, 2019 07:18
@galderz
Copy link
Member Author

galderz commented Nov 14, 2019

Ah yes, squashed

@gastaldi gastaldi added this to the 1.1.0 milestone Nov 14, 2019
@gastaldi gastaldi merged commit fa0339c into quarkusio:master Nov 14, 2019
@gsmet
Copy link
Member

gsmet commented Nov 14, 2019

I will not backport that one. There is a whole set of patches we need for GraalVM 19.3 support.

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.

5 participants