-
Notifications
You must be signed in to change notification settings - Fork 277
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 native-image build is broken #1514
Comments
with kudos to @poslegm again. note this won't actually work until scalameta/scalafmt#1514 is resolved.
Thank you for reporting! Did you try passing in a reflection file? See
Even if you get it working, I believe it might be better to link a different main function that doesn't do runtime dependency resolution and classloading. It would only use the scalafmt/scalafmt-cli/src/main/scala/org/scalafmt/cli/Cli.scala Lines 91 to 93 in ba6ebc3
This main function could error in cases when the |
BTW, coursier has a
|
I hope that #1434 can solve this. UPD: I built scalafmt for 2.13 and assembly works good |
Also I tried to play with Graal reflection configs but unsuccessful 😞 Judging by the stacktrace problem may be in https://github.com/olafurpg/metaconfig/blob/master/metaconfig-core/shared/src/main/scala/metaconfig/generic/Field.scala#L37 (StaticAnnotation in lambda)
But I am not sure |
Interesting, I would be open to merge a metaconfig PR refactoring the lambda into val annots = annotations.mkString("@", ", @", "") if that helps. |
I'm able to link scalafmt with the recent 19.3 release without changes to scalafmt or metaconfig! |
I confirm that. Latest version of scalafmt successfully builds with GraalVM v19.3 and command
@mroth try it in your build pipeline, please |
I'm currently working on improving the native-image support (better error messages for version mismatch, improved performance). @mroth FYI inspired by your project, would also like to update our CI to build binaries for linux/macos on every merge into master! |
With this and a few changes it seems to be working now. I haven't tested the actual binaries (I'm currently at the airport in China about to board a flight) but it looks like its succeeding. Check out the latest at mroth/scalafmt-native#6 and let me know what you think, I can get this merged this weekend or early next week and release if all looks good.
Awesome! Let me know how I can help. |
Fixed in #1561. |
This one ended up being much more than a simple version bump! :-) Also switches to using a matrix build strategy across OSes. Original commits pre-squash: * bump GraalVM to 19.2.0.1 * add CI verification of docker build status * bump scalafmt to v2.1.0 * new style coursier compilation in dockerfile with kudos to @poslegm again. note this won't actually work until scalameta/scalafmt#1514 is resolved. * new style compilation for github actions as well releases will need to be reverified once build is working. * use coursier -p flag instead of paste munging * bump to scalafmt 2.2.1 * bump GraalVM version string * bump graalvm * fix graalvm binary download location moved again * fix: directory structure changed too sigh * bump scalafmt patch version to 2.2.2 * add init-at-build-time and allow-incomplete-classpath flags suggested in bug thread * macOS -> darwin for consistency * fix _ vs - typo introduced
Steps
Problem
GraalVM output:
Notes
Build was broken after #1511
The text was updated successfully, but these errors were encountered: