-
Notifications
You must be signed in to change notification settings - Fork 51
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
Unable to create .json
configuration files following the documentation of Gradle plugin
#259
Comments
native-image-test.zip |
I used a documentation here: https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html#agent-support |
Btw after reverse engineering a bit, I found a WA: you can replace |
That session folder is used in order to make sure that concurrent agent runs don't overwrite each-others outputs -- it should at a later stage be merged using a dedicated task, however SIGKILL prevents that task from ever executing. What it looks to me is that we need to implement a watchdog that would finalize agent processing. |
I'm not sure that would be easy to do. Hitting CTRL+C will interrupt the Gradle build and it is expected, from my POV, that it doesn't do more. Maybe we should document this behavior instead, and recommend to have a stop endpoint in the application to shutdown it cleanly (e.g [https://docs.micronaut.io/latest/guide/#stopEndpoint](what Micronaut offers). |
This also happens when an application ends with an exit code != 0 or with an exception. |
If the app ends with an different exit code, you can still use |
Even when I use |
Can you please mark |
I had the same problem.
Replace
|
Describe the bug
When I
./gradlew -Pagent run
an application, do some operations with it and close it not gracefully (imagine an application likewhile (true) { ... }
and killing it), the agent creates.json
files not inbuild/native/agent-output/run
, but inbuild/native/agent-output/session-4671-20220628T174143Z
(of smth like that). Because of that, the following task./gradlew metadataCopy --task run --dir src/main/resources/META-INF/native-image
fails sayingjava.io.FileNotFoundException: /path-to-the-project/build/native/agent-output/run/reflect-config.json (No such file or directory)
.To Reproduce
id("org.graalvm.buildtools.native") version "0.9.12"
andgraalvm-ce-java11-22.1.0
.fun main() { while(true) {} }
./gradlew -Pagent run
to produce configs./gradlew metadataCopy --task run --dir src/main/resources/META-INF/native-image
to copy configs to resources (you'll see an exception here)Expected behavior
Config files are created and copied to
resources
folder.Logs
System Info (please complete the following information):
macOS Monterey
22.1 CE
11
native-gradle-plugin:0.9.12
The text was updated successfully, but these errors were encountered: