sbt / zinc

Scala incremental compiler library, used by sbt and other build tools
Apache License 2.0
333 stars 118 forks source link

Zinc foreground CLI? #946

Open terpstra opened 3 years ago

terpstra commented 3 years ago

I've seen in #544 that Zinc does not have its own CLI.

My question: is there another project which provides a scalac-like command-line interface to zinc?

Bloop is not an option. I need a solution that runs synchronously, as a foreground process, without spawning any independently running services in the background. Scalac works great for this, but I'd like to benefit from incremental compilation.

If there is more than one project with a CLI, can any of them be compiled as a graalVM native-image to reduce the start up times?

Thanks!

eed3si9n commented 3 years ago

My question: is there another project which provides a scalac-like command-line interface to zinc?

Not that I'm aware of.

terpstra commented 3 years ago

For anyone else who wants this in the future: https://github.com/gatling/gatling/blob/master/gatling-compiler/src/main/scala/io/gatling/compiler/ZincCompiler.scala

That is fairly easy to translate into a command-line version, which is what I did.