You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently JavaModule#compile with a custom JVM relies on Zinc forking a JVM for each Java compilation, which is slow, and Zinc does not support forking JVMs for ScalaModule#compile and it would anyway be prohibitively slow (upstream discussion sbt/zinc#1498).
The correct solution for this is to move ZincWorkerImpl into a long-lived worker subprocess when def javaHome is overridden. This will allow us to keep the Java compilation process warm so it can benefit from the fast in-memory compiles, while also supporting Scala compilation on custom JVM versions
This will likely require an overhaul of the ZincWorkerApi.scala to dis-entangle things sufficiently that we can impose a subprocess boundary between the caller and callee. This would break binary compatibility and would need to wait for 0.13.0
The text was updated successfully, but these errors were encountered:
lihaoyi
changed the title
Make custom JVM versions used during Scala compilation
Use custom JVM versions during Scala compilation
Nov 18, 2024
Follow up from #3480
Currently
JavaModule#compile
with a custom JVM relies on Zinc forking a JVM for each Java compilation, which is slow, and Zinc does not support forking JVMs forScalaModule#compile
and it would anyway be prohibitively slow (upstream discussion sbt/zinc#1498).The correct solution for this is to move
ZincWorkerImpl
into a long-lived worker subprocess whendef javaHome
is overridden. This will allow us to keep the Java compilation process warm so it can benefit from the fast in-memory compiles, while also supporting Scala compilation on custom JVM versionsThis will likely require an overhaul of the
ZincWorkerApi.scala
to dis-entangle things sufficiently that we can impose a subprocess boundary between the caller and callee. This would break binary compatibility and would need to wait for 0.13.0The text was updated successfully, but these errors were encountered: