8000 Move `ScalaFmt` into its own classloader by lihaoyi · Pull Request #4954 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move ScalaFmt into its own classloader #4954

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

lihaoyi
Copy link
Member
@lihaoyi lihaoyi commented Apr 18, 2025

Cuts mill-assembly.jar from 55mb to 53mb, so ~2mb of savings, with a somewhat cleaner classpath. the scalafmt-dynamic code will be downloaded on-demand

)
}

def scalafmtClassLoader: Worker[java.net.URLClassLoader] = Task.Worker {
Copy link
Member
@lefou lefou Apr 18, 2025

Choose a reason for hiding this comment

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

Nice trick to have the classloader in its own worker, since this avoids any explicit AutoCloesable handling. I think we should keep this private though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops sorry I missed this, I guess we may come back to it as part of #4716 when we go around privatizing everything we can

@lihaoyi lihaoyi merged commit e284f39 into com-lihaoyi:main Apr 18, 2025
33 of 36 checks passed
@lefou lefou added this to the 0.13.0 milestone Apr 18, 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.

2 participants
0