Skip to content
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

Blog Post: Fast JVM Assembly Jars Creation with the Mill Build Tool #4558

Merged
merged 13 commits into from
Feb 16, 2025

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Feb 14, 2025

No description provided.

It turns out there's no magic in Mill's fast assembly generation: just careful use of
the available APIs provided by the underlying JVM platform. Hopefully this approach
can eventually make its way to other build tools like Maven or SBT, so everyone can
benefit from the fast assembly jar creation that Mill provides today.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is only between the lines: The downside is that afaik updating the zip/jar file is done by appending to it, right? So the incremental assembly will grow over time.
Plus a 'incrementally' built assembly won't be the same byte-by-byte than building it from scratch.

Of course, during development this isn't a concern.

It might be a concern if you do some incremental build for a deployment/release process. Then you get a assembly with 'dead-junk' in the ZIP.

Note, I didn't verify my claims: I might miss understand this part / remember things wrongly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No downsides. We do append, but to the upstream assembly, which does not contain the to-be-added files yet. The upstream assembly is cached and always copied before appended to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah...I missed the obvious. Yep, is clearly written.

@lihaoyi lihaoyi marked this pull request as ready for review February 16, 2025 12:58
@lihaoyi lihaoyi merged commit 8886366 into com-lihaoyi:main Feb 16, 2025
17 of 18 checks passed
@lefou lefou added this to the 0.13.0 milestone Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants