-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generate executable via GraalVM #12
Conversation
Attempt #1From fat JAR, with Dockerized GraaVM 1.0.0-rc1: visibly hit similar issue than oracle/graal#385 / oracle/graal#375, related to "static initializers" limitation? 😭 :
|
Attempt #2With locally built
Similar issue: oracle/graal#411. |
Give a try using arguments like: native-image -H:+ReportUnsupportedElementsAtRuntime -J-Xmx3G -J-Xms3G -jar ./target/hubstats-0.1.0-SNAPSHOT-standalone.jar hubstats.core Cf. https://www.astrecipes.net/blog/2018/07/20/cmd-line-apps-with-clojure-and-graalvm. |
See the related GraalVM issue I have opened: oracle/graal#420. |
Related resources:
|
This comment on Clojure reflection / GraalVM limitation can also be useful. |
Two big news:
|
Oops, hubstats's executable still cannot be generated with GraalVM 1.0.0 RC 11, visibly. 💥
I had forgotten that all the important code was commented out. 😭 |
I am now able to report unsupported features while generating native image :
|
Attempt #7897123 😜With ./generate-executable.sh
# ✂ snip!
Warning: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Build on Server(pid: 167, port: 42445)*
[hubstats.core:167] classlist: 10,654.27 ms
[hubstats.core:167] (cap): 1,121.64 ms
[hubstats.core:167] setup: 2,439.03 ms
[hubstats.core:167] (typeflow): 3,412.47 ms
[hubstats.core:167] (objects): 945.15 ms
[hubstats.core:167] (features): 265.40 ms
[hubstats.core:167] analysis: 4,722.17 ms
[hubstats.core:167] (clinit): 96.55 ms
[hubstats.core:167] universe: 410.29 ms
[hubstats.core:167] (parse): 624.01 ms
[hubstats.core:167] (inline): 1,425.12 ms
[hubstats.core:167] (compile): 4,951.31 ms
[hubstats.core:167] compile: 7,264.01 ms
[hubstats.core:167] image: 408.76 ms
[hubstats.core:167] write: 97.27 ms
[hubstats.core:167] [total]: 26,167.22 ms
Warning: Image 'hubstats.core' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation).
=> Check the executable:
Display statistics for GitHub pull requests.
Mandatory parameters:
--organization GitHub organization
-o GitHub organization (shorthand)
--repository GitHub repository
-r GitHub repository (shorthand)
--token GitHub access token (optional)
-t GitHub access token (shorthand, optional)
Optional parameters:
--repositories Comma-separated list of repositories (optional)
--since-weeks output events that occcured since this number of weeks (optional, default: 1)
-w output events that occcured since this number of weeks (shorthand, optional, default: 1)
--since-days output events that occcured since this number of days (optional)
-d output events that occcured since this number of days (shorthand, optional)
--since output events that occcured since a date with format '"yyyy-MM-dd'T'HH:mm:ssZ' (optional)
-s output events that occcured since a date with format '"yyyy-MM-dd'T'HH:mm:ssZ' (shorthand, optional)
Examples:
lein run --organization docker --repository containerd --token $token
lein run --organization docker --repository containerd --since "2017-01-17T00:00:00Z"
lein run --organization docker --repository containerd --since-days 10
lein run --organization docker --repositories docker,containerd
=> Copy it to current directory: |
6f6f75d
to
2e42434
Compare
Copy/pasted script from nicokosi/hubstats#12. 😇 Note that the "--no-fallback" native-image option cannot be used for the moment (the compilation to native code fails), so the application runs in the normal JVM. See https://www.graalvm.org/docs/reference-manual/aot-compilation/
Copy/pasted script from nicokosi/hubstats#12. 😇 Note that the "--no-fallback" native-image option cannot be used for the moment (the compilation to native code fails), so the application runs in the normal JVM. See https://www.graalvm.org/docs/reference-manual/aot-compilation/
Note that the "--no-fallback" native-image option cannot be used for the moment (the compilation to native code fails), so the application runs in the normal JVM. See https://www.graalvm.org/docs/reference-manual/aot-compilation/
Merging this pull request with the fallback mode. I'll see later how to fix |
This interesting blog post made me want to try using GraalVM in order to generate hubstats' executable.