Skip to content

GraalVM dynamic bootstraps registration#53378

Draft
dmlloyd wants to merge 1 commit intoquarkusio:mainfrom
dmlloyd:graalvm-constants
Draft

GraalVM dynamic bootstraps registration#53378
dmlloyd wants to merge 1 commit intoquarkusio:mainfrom
dmlloyd:graalvm-constants

Conversation

@dmlloyd
Copy link
Copy Markdown
Member

@dmlloyd dmlloyd commented Mar 31, 2026

This will allow Gizmo 2 users to generate optimized lambdas and other indy/condy-based optimizations.

See oracle/graal#12453 and quarkusio/gizmo#459 for more information.

@quarkus-bot

This comment has been minimized.

b0.invokeVirtual(GRAALVM_VERSION_COMPARE_TO,
graalVMVersion,
b0.newArray(int.class, Const.of(25), Const.of(1))),
0), b2 -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: since we're nested in b0, this should be b1, right? :-)

Ladicek
Ladicek previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Member

@Ladicek Ladicek left a comment

Choose a reason for hiding this comment

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

Can't say I understand the change in NativeImageFeatureStep, but LGTM otherwise.

@geoand geoand changed the title GraalVM dyanmic bootstraps registration GraalVM dynamic bootstraps registration Apr 1, 2026
@dmlloyd
Copy link
Copy Markdown
Member Author

dmlloyd commented Apr 1, 2026

I'm going to clean things up and improve the documentation.

@dmlloyd
Copy link
Copy Markdown
Member Author

dmlloyd commented Apr 1, 2026

Hey, it looks like some of the implementation is actually missing. I guess I shouldn't pick up branches after several weeks and just jam them into PRs.

@dmlloyd dmlloyd marked this pull request as draft April 1, 2026 13:43
@dmlloyd

This comment was marked as resolved.

This will allow Gizmo 2 users to generate optimized lambdas and other indy/condy-based optimizations.
@dmlloyd dmlloyd force-pushed the graalvm-constants branch from ada2b2e to 76de911 Compare April 6, 2026 21:10
@dmlloyd dmlloyd marked this pull request as ready for review April 6, 2026 21:10
@quarkus-bot quarkus-bot Bot added area/arc Issue related to ARC (dependency injection) area/dependencies Pull requests that update a dependency file area/fault-tolerance area/hibernate-validator Hibernate Validator area/hibernate-orm Hibernate ORM area/qute The template engine area/rest area/rest-client area/scheduler area/smallrye area/vertx labels Apr 6, 2026
@dmlloyd
Copy link
Copy Markdown
Member Author

dmlloyd commented Apr 6, 2026

OK should be reviewable now. Most of the changes are to make build steps register the proper build items.

@quarkus-bot
Copy link
Copy Markdown

quarkus-bot Bot commented Apr 7, 2026

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 76de911.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
Native Tests - HTTP Build Failures Logs Raw logs 🔍
Native Tests - Misc1 Build Failures Logs Raw logs 🔍
Native Tests - Windows support Build Failures Logs Raw logs 🔍

Full information is available in the Build summary check run.
You can consult the Develocity build scans.

Failures

⚙️ Native Tests - HTTP #

- Failing: integration-tests/vertx-web integration-tests/vertx-web-jackson 

📦 integration-tests/vertx-web

io.quarkus.it.vertx.SimpleEndpointIT.testEndpoint - History - More details - Source on GitHub

Details
java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:516)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:714)

📦 integration-tests/vertx-web-jackson

com.example.reactivejackson.SimpleEndpointIT.ensure_there_is_no_null_attribute - History - More details - Source on GitHub

Details
java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:516)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:714)

⚙️ Native Tests - Misc1 #

- Failing: integration-tests/qute 

📦 integration-tests/qute

io.quarkus.it.qute.QuteITCase.testTemplates - History - More details - Source on GitHub

Details
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: a string containing "Hello MK"
  Actual: {"details":"Error id c332d8a1-bfd7-43bb-b836-d17f21329751-1","stack":""}

	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:516)

⚙️ Native Tests - Windows support #

- Failing: integration-tests/qute 

📦 integration-tests/qute

io.quarkus.it.qute.QuteITCase.testTemplates - History - More details - Source on GitHub

Details
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: a string containing "Hello MK"
  Actual: {"details":"Error id 4671a340-22b7-41b7-8fd9-75097592cdf8-1","stack":""}

	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:344)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:516)

Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.testContinuousTestingScenario3 - History

  • org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/apicurio/apicurio-registry:3.1.7 - java.util.concurrent.CompletionException
Details
java.util.concurrent.CompletionException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/apicurio/apicurio-registry:3.1.7
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)

⚙️ JVM Tests - JDK 21

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingTestCase.testContinuousTestingScenario2 - History

  • org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/library/redis:7 - java.util.concurrent.CompletionException
Details
java.util.concurrent.CompletionException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/library/redis:7
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)

⚙️ Gradle Tests - JDK 25

📦 integration-tests/gradle

io.quarkus.gradle.ConfigSystemOverrideProjectTest.configSystemOverrideProject - History

  • Gradle build failed with exit code 1 - java.lang.AssertionError
Details
java.lang.AssertionError: Gradle build failed with exit code 1
	at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:173)
	at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:87)
	at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:82)
	at io.quarkus.gradle.ConfigSystemOverrideProjectTest.configSystemOverrideProject(ConfigSystemOverrideProjectTest.java:14)

⚙️ Gradle Tests - JDK 17 Windows

📦 integration-tests/gradle

io.quarkus.gradle.devmode.IncludedKotlinBuildDevModeTest.main - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes 30 seconds. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes  30 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:164)
	at io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:170)

⚙️ JVM Integration Tests - JDK 25 Semeru

📦 integration-tests/compose-devservices

io.quarkus.it.compose.devservices.rabbitmq.RabbitmqTest.test - History

  • Read timed out - java.net.SocketTimeoutException
Details
java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:277)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:302)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:354)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:798)
	at java.base/java.net.Socket$SocketInputStream.implRead(Socket.java:974)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:964)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)

@dmlloyd

This comment was marked as resolved.

Comment on lines +937 to +939
Gizmo gizmo = Gizmo
.create(new GeneratedClassGizmo2Adaptor(generatedClasses, generatedResources, constantBootstraps,
appClassPredicate))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Aside: the fact that our autoformatter considers this a nice looking code drives me crazy and I have no idea why we accept this. The autoformatter, at least in its current configuration, is terrible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree, it's gotten to the point where I just make super long lines and let the formatter figure it out. I don't even try to make it look good, it's a waste of time.

@dmlloyd
Copy link
Copy Markdown
Member Author

dmlloyd commented Apr 7, 2026

OK so what's happening here is that we are testing in CI with Mandrel-25.0.2.0-Final, but I believe this feature won't become available until 25.1.x is out; @zakkak can you verify that for me? (This is using the new bootstraps registration API in case that wasn't clear)

@gsmet gsmet marked this pull request as draft April 8, 2026 20:33
@gsmet
Copy link
Copy Markdown
Member

gsmet commented Apr 8, 2026

Making it draft as AFAICS some native tests are failing.

@zakkak
Copy link
Copy Markdown
Member

zakkak commented Apr 16, 2026

OK so what's happening here is that we are testing in CI with Mandrel-25.0.2.0-Final, but I believe this feature won't become available until 25.1.x is out; @zakkak can you verify that for me? (This is using the new bootstraps registration API in case that wasn't clear)

Correct and I don't see it being backported to upstream GraalVM 25.0.x (since it's not a bug) . If it's really important we can try backporting it to Mandrel 25.0.x though, cc @Karm @jerboaa (to share their thoughts).

In the meantime, I guess we could guard the API usage with a GraalVM version check, but I suspect we would also need a different gizmo version which doesn't seem reasonable.

Also FYI there is currently no ETA on when the next GraalVM/Mandrel feature release will happen...

@jerboaa
Copy link
Copy Markdown
Contributor

jerboaa commented Apr 17, 2026

OK so what's happening here is that we are testing in CI with Mandrel-25.0.2.0-Final, but I believe this feature won't become available until 25.1.x is out; @zakkak can you verify that for me? (This is using the new bootstraps registration API in case that wasn't clear)

Correct and I don't see it being backported to upstream GraalVM 25.0.x (since it's not a bug) . If it's really important we can try backporting it to Mandrel 25.0.x though, cc @Karm @jerboaa (to share their thoughts).

If this is critical enough for Quarkus we should start the backporting process to 25.0 (community repo). I'd expect for certain features needing to land in an 25.0 update. It's not clear if 25.1 (or whatever the next version) will see the light of day any time soon as you say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants