Skip to content

sbt/zinc

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
July 10, 2022 23:25
May 14, 2023 23:38
May 15, 2023 02:14
November 15, 2021 07:33
November 29, 2022 12:02
April 17, 2022 22:48
May 6, 2019 16:45
May 6, 2019 16:55
January 23, 2022 21:23
May 15, 2023 02:14

Zinc is the incremental compiler for Scala.

Most Scala developers use it constantly without noticing. It's leveraged by build tools such as sbt, IntelliJ, Maven, Gradle, Mill, Pants, Bazel, and Bloop.

Zinc reduces compilation times without sacrificing correctness. When you change a source file, Zinc analyzes the structure of your code and recompiles only the source files affected by your change. The result should be identical to the output of a clean compile.

Code of conduct

All communication in sbt/* repositories and chat rooms is covered by Scala Code of Conduct. Please be kind and courteous to each other.

Contributing

This project is maintained by Lightbend, the Scala Center, and other OSS contributors.

You're welcome to participate. To learn how, see the CONTRIBUTING guide.

Integrating Zinc

Most Scala users don't need to think about Zinc at all. Just use any of the build tools listed above, and you get Zinc's benefits.

If you're a build tool author, add Zinc to your project with:

libraryDependencies += "org.scala-sbt" %% "zinc" % "$ZINC_VERSION"

where $ZINC_VERSION is the latest tag pushed to the GitHub repository.

To integrate Zinc, you have two options:

  1. Interface directly with Zinc APIs and maintain your own integration.
  2. Use Bloop (which has a compilation server that simplifies tooling integrations).

Note to compiler bridge authors

The compiler bridge classes are loaded using java.util.ServiceLoader. In other words, the class implementing xsbti.compile.CompilerInterface2 must be mentioned in a file named: /META-INF/services/xsbti.compile.CompilerInterface2.

Acknowledgements

Logo Acknowledgement
We thank Yourkit for supporting this open-source project with its full-featured profiler.