Git Product home page Git Product logo

zinc's Introduction

Zinc

Build Status

Zinc is the incremental compiler for Scala. Most Scala developers use it daily without noticing -- it's embedded in key build tools like sbt, CBT and pants.

The primary goal of Zinc is to make your compilation times faster without sacrificing correctness. When you change a source file, Zinc analyses the dependencies of your code and compiles the minimum subset of source files affected by your change. The generated code should be identical to the output of a clean compile.

History

Originally this project was part of sbt, referred to as the incremental compiler module of sbt.

To allow for build tools outside of sbt to use it, the project typesafehub/zinc was created to re-export the whole of sbt to utilise the incremental compiler module.

With the effort for sbt 1, the sbt team extracted the incremental compiler from the sbt repo, to the sbt/zinc repo, recycling the name "zinc".

This new repository is an effort driven by Lightbend to allow any build tool use the Scala incremental compiler, as sbt 1.0, pants, bazel, cbt, Intellij, Scala IDE and Maven Plugin.

Current status

The Zinc 1.0 incremental compiler implements significant improvements over 0.13.13's version when it comes to performance, correctness and dependency analysis.

Besides it's use in sbt, Zinc 1.0 is also used by many build tools in the Scala ecosystem:

  • Bazel via rules_scala
  • Bloop - a compile server using zinc to compile Scala and Java code
  • Maven via the Scalor Plugin
  • Mill - a Scala-based build tools using zinc to compile Java and Scala code
  • Pants - a Python-based build tool for monorepos

If you want to create your own integration, 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).

Installation and use

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

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

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

Code of conduct

All communication in sbt/* repositories, including Zinc, and Gitter chat rooms such as sbt/zinc-contrib are covered by Lightbend Community 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 contribute to this repository. For information on how to contribute, please check the CONTRIBUTING guide.

This software is released under the following LICENSE.

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.

zinc's People

Contributors

adpi2 avatar adriaanm avatar dotta avatar duhemm avatar dwijnand avatar eatkins avatar eed3si9n avatar ephemerist avatar gkossakowski avatar harrah avatar havocp avatar ijuma avatar indrajitr avatar jedesah avatar jroper avatar jsuereth avatar jtjeferreira avatar jvican avatar knirski avatar lukaszwawrzyk avatar olegych avatar paulp avatar pdalpra avatar pvlugter avatar retronym avatar romanowski avatar smarter avatar ttreyer avatar vigdorchik avatar xuwei-k avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.