-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Enable JDK preview features from Gradle-based build #10472
Comments
/cc @quarkusio/devtools |
sorry for wrong classification; not really a bug but feature-request. |
/cc @glefloch |
Just copying what I mentioned in chat that we already have this feature in Maven |
Thanks for reporting this. |
@glefloch IIRC, in Maven we check and see if the compiler flag is enabled, and if so we just add it to the JVM flags we launch the dev jar with |
@glefloch actually, i am wondering if something is broken for quarkusDev as well. It worked in the past but complains now when i want to set --enable-preview. I am quiet sure in the past i was able to set
jvmArgs seems to be a List by now; so i tried
But i get
|
@38leinaD I just ran some tests on my machine.
or, if you don't set Regarding the
Which feature are you trying? |
Thanks for all the explaination; it is really easy now to configure the preview features! Indeed i was able to create a reproducer. I am also able to use text-blocks with the config you describe, but it starts failing when i add my own microprofile-config source as an example: https://github.com/38leinaD/quarkus-config-source-preview-features-reproducer
|
Hi, I just tried the reproducer and it worked fine for me. So perhaps |
hm, so @glefloch can reproduce the issue and @geoand cannot. very strange.
Getting the issue/error every time. I now even cloned my repdroducer to a different location and did a quarkusBuild. Same issue. I tested with java 13 and java 14. Getting essentially the same error. For java 13, the error is just saying that "(class file version 57.65535)". |
Nevermind, I was able to reproduce the error |
It shouldn't be a problem. Or maybe there is something weird with the interaction of |
Maybe i am totally wrong, but for me it looks like this (just idea; not verified in any way):
Also, I have not tested it, but I would assume that the problem is the same for Maven... |
I have confirmed it by adding |
Problem is that the quarkus build relies on a Gradle worker so you need to set quarkus {
buildForkOptions {
jvmArgs += ['--enable-preview']
}
} This doesn't appear to be inherited from |
Hello there, I'm running into this problem but when running
|
@kpagratis could you help me with a reproducer? The one referenced in this issue appears to work with |
@aloubyansky sorry for the delay, but here's a simple reproducer quarkusDev works fine, but when running quarkusBuild followed by quarkusRun the error above is shown. Thanks! |
The following PR adds |
I'm using Maven, so I'm not sure, if I have the same issue discussed here, or if it's a new one. I'm playing around with JDK 23 preview features, and I got preview features working in unit-/quarkus-tests and dev-mode (even after a hot reload). But when running the integration tests, if fails after ~1min, throwing:
I have a reproducer here. |
Describe the bug
It seems to be not possible to enable JDK preview features for the Gradle quarkusBuild task.
If i set
it seems like compilation is triggered with --enable-preview, but whatever the quarkusBuild task does afterwards fails with this
Environment (please complete the following information):
uname -a
orver
: Linux hedgehog 4.9.0-12-amd64 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64 GNU/Linuxjava -version
: openjdk version "14.0.1" 2020-04-14OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
mvnw --version
orgradlew --version
): gradleThe text was updated successfully, but these errors were encountered: