-
Notifications
You must be signed in to change notification settings - Fork 33
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
GraalVM support #183
base: main
Are you sure you want to change the base?
GraalVM support #183
Conversation
Damn, that is too bad. I was hoping we could automatically run https://www.graalvm.org/22.0/reference-manual/native-image/Agent/ during testing through Gradle 🤔 That'd be really nice.. Using WDYT we should do with this PR @organize? If you're interested in investigating running the agent through Gradle, I'm up for that. Otherwise we might leave it open, I hope they fix this in KotlinX Serialization. Another option might be using Jackson instead. Might still need some GraalVM configuration though, but perhaps more straight forward. |
It's possible to run tests through the agent to collect configuration, but that configuration is not necessarily compatible with the server image at runtime 😢 It'd be kind of cool to automatically dump and merge configurations simply by running the tests, but I can't see that working. In order for it to work at runtime, you need 100% test coverage, and any change in a dependency would cause grey hairs. Plus you'd have to run the tests with the agent, in order to run the tests as a native image 😅 To be clear, Jackson would have the same issue, in practice even worse because it's reflection-based. This issue is with Ktor using I wrote some thoughts in the issue, which you probably already saw. To me there doesn't seem to be an ergonomic/developer friendly way of truly supporting GraalVM at this moment. |
Agreed, I am leaving this PR open as a draft for documentation if you don't mind. |
@nomisRev just to get documentation work counted for Hacktoberfest do you mind adding a |
[closes #169]
call.respondText()
overcall.respond()
to avoid reflectioncall.receiveText()
overcall.receive()
to avoid reflectionThis should be tested on various setups. Making
nativeTestCompile
/nativeTestRun
work is a job for another PR, Kotest does not seem to be GraalVM compatible. It's possible to run the metadata agent to dump required test configuration, but that would have to be repeated every time there changes to tests. All in all, the world might not be ready for GraalVM yet 😿