-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
feat: add jlink & jpackage Java examples #4038
Conversation
What happens after I run the |
Overall the code looks reasonable I think. Some nits and some tweaks likely necessary to get it working reliably in CI and on my laptop. One area that needs to be fleshed out is the english docs surrounding the examples. We should have a short explanation of what is going on, how these traits and the output files can be used from a user perspective, and with links to upstream documentation for more details |
Managed to find the |
Please add me as co-author to the relevant git commit.
|
Co-authored-by: Tobias Roeser <[email protected]>
311414d
to
9208ba6
Compare
@lefou |
OK, I'll update the example code to be a basic desktop app in Swing.
In the original issue description, I interpreted your mention of " |
Double-clicking or doing an I've updated the For the |
@ayewo for an example of the inline docs for the example tests, see https://github.com/com-lihaoyi/mill/blob/main/example/scalalib/basic/3-multi-module/build.mill. Basically the examples should contain their own explanations in |
@lihaoyi I’ve addressed all of your feedback. |
Thanks, will take a look |
Just looked through this, I think it looks pretty good. Some last requests:
|
Thanks for the feedback.
Unfortunately, From the docs:
|
Ah ok, I see. That's fine then |
We can leave it as is |
Quick question regarding some test failures in CI: One of the usage example tests for java -jar ./out/foo/assembly.dest/out.jar
Nov 28, 2024 12:45:43 PM foo.Foo readConf
INFO: Loaded application.conf from resources: Foo Application Conf
Nov 28, 2024 12:45:44 PM foo.Bar lambda$main$0
INFO: Hello World application started successfully In other words, it uses a logger that prints the current timestamp. I'm wondering if I'm guessing I'll need to remove the timestamp, right? |
@lihaoyi changes are ready to be merged. |
@ayewo looks like some of the test failures are legit |
@lihaoyi I believe I've fixed all the legit failures related to my changes. |
Looks great, thanks @ayewo ! Please email me your international bank transfer details and I can close out the bounty |
While merging, you forgot to keep me in the co-authors. 😟 |
This intended to close #3638.
The
JlinkModule
creates a runtime image in two steps:jlink.jmod
file for the module containing themainClass
using thejmod
tool;jlink.jmod
with a runtime image.The generated runtime image can be executed with:
As for the
JpackageModule
implementation, I decided to reuse most of theJpackageModule
code @lefou linked to the original issue. Of course his code completely avoids thejmod
dance by usingjpackage
to create a native package/installer directly.jpackage
supports up to 3 different package/installer outputs on macOS:Would be interested to hear your thoughts on the slight difference between how the 2 traits are implemented.