-
-
Notifications
You must be signed in to change notification settings - Fork 48
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 support for poly tool #101
Comments
FYI, the |
This looks really promising! |
I've tested the following commands on the polylith repo:
Tests do not seem to work, yet:
|
I think the main showstopper is the tools.deps.alpha dependency. We use it to calculate Java classpath for running tests in the project scope. However, Michiel's tweet gives me some hope. |
This is likely just a reflection issue. Adding |
Yes, this is also a show-stopper for getting something like tools.build directly into babashka. The code in tools.build itself is really light weight, but the tools.deps.alpha dep makes it a lot heavier (all calls to create-basis). Compiling tools deps alpha to native works, but you'll get a binary of 100mb or so. |
To give some more ideas: For babashka, whenever I need a classpath, either for deps in bb.edn or for |
I have made polilith native-compiled work with I'm interested in making the tool GraalVM compatible, so I can work further with this, however we would have to agree on how I would suggest that for GraalVM PS: Sorry for typos. I'm on phone ATM. |
FYI. I'm not against a native version, but my guess is that starting a I can't promise when this will be released, but I'm putting a lot of effort into this. |
IMO we can mix native + poly shell. It's up to you to decide, however :) |
I don't think the native version will work with issue #113 (support for custom commands) either, at least not if implemented the way I suggest. So right now, a native version doesn't feel attractive to me, with all the extra maintenance cost and future functionality that will be hard or impossible to support. |
Ah. You're right! Making a native poly version is useless then! Thank you for the clarification. |
I guess with the new Polylith |
Is your feature request related to a problem? Please describe.
Startup time is really important for developer CLI tools.
Describe the solution you'd like
Faster response on the CLI when running
poly
Describe alternatives you've considered
One alternative would be to check if poly could run as a babashka script.
Additional context
I've tried to build a native-image and it seems to work. Would be great to get feedback from someone with more GraalVM experience as well as tested by people who use polylith everyday (I'm just starting my polylith journey).
Results look promising running on Polylith repo (version
0.2.0-alpha10 (2021-08-02)
):The text was updated successfully, but these errors were encountered: