• This repository has been archived on 10/Nov/2017
  • Stars
    star
    303
  • Rank 137,655 (Top 3 %)
  • Language
    Scala
  • Created over 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⛔️ [DEPRECATED] sbt's scala incremental compiler

Zinc

Zinc is a stand-alone version of sbt's incremental compiler.

Download the latest stable version.

Status

Attention: There is a new effort concerning the development of zinc, which is hosted at sbt zinc.

Zinc is currently in a maintenance mode. There's no active development of new features. New releases are meant to stay up-to-date with latest sbt releases. Zinc tries to follow final releases of sbt. It doesn't follow milestone releases but exceptions can be introduced on a case-by-case basis.

Maintenance of zinc is performed on a best-effort terms. We try our best to not lag behind sbt with zinc releases but we do not guarantee it. Occasional delays can happen due to other priorities.

If you are interested in helping with zinc maintenance or development, please contact Adriaan Moors (@adriaanm) at Lightbend.

Build

Zinc is built using sbt 0.13. See development.md.

Previously published distributions up to 0.3.1-M1 relase can be found in the old zinc repo. Newer distributions are hosted under [Lightbend downloads].

Here's the table of final releases in 0.3.x series:

zinc version sbt version Download
0.3.13 0.13.13 zinc-0.3.13.tgz
0.3.12 0.13.12 zinc-0.3.12.tgz
0.3.11 0.13.11 zinc-0.3.11.tgz
0.3.9 0.13.9 zinc-0.3.9.tgz
0.3.8.1 0.13.8.1 zinc-0.3.8.1.tgz
0.3.8 0.13.8 zinc-0.3.8.tgz
0.3.7 0.13.7 zinc-0.3.7.tgz
0.3.6 0.13.6 zinc-0.3.6.tgz
0.3.5.3 0.13.5 zinc-0.3.5.3.tgz
0.3.5.2 0.13.5 zinc-0.3.5.2.tgz
0.3.5.1 0.13.5 zinc-0.3.5.1.tgz
0.3.5 0.13.5 zinc-0.3.5.tgz
0.3.2 0.13.2 zinc-0.3.2.tgz
0.3.1 0.13.1 zinc-0.3.1.tgz
0.3.0 0.13.0 zinc-0.3.0.tgz

Options

To get information about options run zinc -help.

Compile

As for scalac the main options for compiling are -classpath for specifying the classpath elements, and -d for selecting the output directory. Anything passed on the command-line that is not an option is considered to be a source file.

Scala

Zinc needs to locate the Scala compiler jar, Scala library jar, and any extra Scala jars (like Scala reflect). There are three alternative ways to specify the Scala jars.

Using -scala-home point to the base directory of a Scala distribution (which needs to contain a lib directory with the Scala jars).

Using -scala-path the compiler, library, and any extra jars (like scala reflect) can be listed directly as a path.

Using -scala-library to directly specify the Scala library, -scala-compiler to specify the Scala compiler, and -scala-extra to specify any extra Scala jars.

If no options are passed to locate a version of Scala then Scala 2.9.2 is used by default (which is bundled with zinc).

To pass options to scalac simply prefix with -S. For example, deprecation warnings can be enabled with -S-deprecation. For multi-part options add the -S prefix to all parts. For example, the sourcepath option can be specified with -S-sourcepath -S/the/source/path.

Java

To select a different javac to compile Java sources, use the -java-home option. To pass options to javac, prefix with -C.

If mixed Java and Scala sources are being compiled then the compile order can be specified with -compile-order, where the available orders are Mixed, JavaThenScala, or ScalaThenJava. The default order is Mixed.

If only Java sources are being compiled then the -java-only option can be added to avoid the Scala library jar being automatically added to the classpath.

Nailed

Zinc comes with built-in Nailgun integration. Running with Nailgun provides zinc as a server, communicating commands via a client, keeping cached compilers in a warm running JVM and avoiding startup and load times.

To run zinc as a build daemon add the -nailed option to all commands, or alias zinc="zinc -nailed".

Nailgun client binaries for common platforms are bundled with zinc. If an ng client is on the current path then this will be used instead.

To shutdown the zinc server run zinc -shutdown. To list currently cached zinc compilers use zinc -status.

Logging

The log level can be set directly with -log-level debug|info|warn|error. Or to set to debug use -debug. To silence all logging use -quiet.

Analysis

The analysis used to determine which files to incrementally recompile is stored in a file. The default location for the analysis cache is relative to the output directory. To specify a different location for the analysis cache use the -analysis-cache option. When compiling multiple projects, and the analysis cache is not at the default location, then a mapping from output directory to cache file for any upstreams projects should also be provided with the -analysis-map option.

Incremental Compiler

There are options for configuring the incremental compiler. One useful option is -transactional, which will restore the previous class files on compilation failure. This allows fixes to be made before retrying incremental compilation, rather than forcing recompilation of larger parts of the source tree due to the error and deleted class files.

See zinc -help for information about all options.

Contributions

Contributions via GitHub pull requests are gladly accepted from their original author. Before we can accept pull requests, you will need to agree to the Lightbend Contributor License Agreement online, using your GitHub account.

License

Copyright 2012 Lightbend, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

scalalogging

Convenient and performant logging in Scala
Scala
177
star
2

activator-akka-stream-scala

Demonstrate Akka streams in Scala
HTML
119
star
3

angular-seed-play

initial
JavaScript
118
star
4

activator-akka-distributed-workers

Typesafe Activator template for distributed workers with Akka cluster.
Scala
117
star
5

activator-akka-java-spring

Activator tutorial for Akka showing Java & Spring integration
HTML
114
star
6

akka-js

Implementation of Akka Actors for Scala.js.
Scala
71
star
7

activator-akka-cluster-sharding-scala

Activator template for the Akka Cluster Sharding feature
Scala
68
star
8

ReactiveMaps

Outdated example, find better ones at the Lightbend Tech Hub instead
HTML
67
star
9

activator-hello-slick

A Slick template for Typesafe Activator
HTML
55
star
10

activator-akka-distributed-workers-java

Typesafe Activator template for distributed workers with Akka cluster in Java.
Java
47
star
11

activator-hello-akka

Hello, Akka tutorial for Activator
HTML
47
star
12

fdp-modelserver

An umbrella project for multiple implementations of model serving
Scala
46
star
13

sbt-multi-jvm

Multi-JVM testing in sbt
Scala
46
star
14

scala-sbt.g8

giter8 template for Scala projects using sbt
Scala
40
star
15

activator-akka-stream-java8

Demonstrate Akka streams in Java8
Java
33
star
16

ghpullrequest-validator

A simple utility to run pull requests against jenkins jobs. Uses Akka.
Scala
30
star
17

sbt-conductr

Typesafe ConductR plugin for sbt
Scala
29
star
18

playconf

Sample application for the introductory Play/Java online training course
Java
27
star
19

netty-http-pipelining

Adds http pipelining capability to Netty
Java
26
star
20

doc-template

Example project to get started with the build process for docs
Python
25
star
21

activator-akka-clustering

Activator tutorial for Akka showing how to get started with Clustering
HTML
24
star
22

sbtosgi

sbt plugin for creating OSGi bundles
Scala
20
star
23

activator-slick-multidb

Slick Multi-DB Patterns (Activator Template)
Scala
20
star
24

conductr-cli

CLI for Lightbend ConductR
Python
16
star
25

fdp-tensorflow-python-examples

Simple machine learning in Python/Tensorflow with model saving
PureBasic
14
star
26

activator-hello-akka-java8

Java
13
star
27

constructr-zookeeper

This library enables to use ZooKeeper as cluster coordinator in a ConstructR based cluster
Scala
13
star
28

echo

Activator trace instrumentation
Scala
12
star
29

ReactiveMapsJava

Java implementation of ReactiveMaps
Java
12
star
30

activator-akka-supervision

Activator tutorial for Akka getting people started with Supervision and Fault Handling
HTML
11
star
31

akka-contrib-extra

ConductR Akka contributions
Scala
9
star
32

fdp-beam-modelServer

Model serving using Beam
Scala
9
star
33

customers

Scala
9
star
34

activator-hello-play

Hello, Play tutorial for Activator
Java
9
star
35

conductr-lib

Scala
8
star
36

activator-akka-jmx-example

Example of using JMX with Akka Actors
Scala
8
star
37

slick-akka-webinar

Demo for webinar: Akka Streams + Akka HTTP + Slick
Scala
8
star
38

akka-workshop

JavaScript
8
star
39

activator-slick-plainsql

Slick Plain SQL Queries (Activator Template)
Scala
8
star
40

activator-hello-scala

The Hello Scala Tutorial from Activator
HTML
8
star
41

sbt-tojar

An sbt plugin that enables straight-to-jar compilation of Scala files
Scala
7
star
42

activator-minimal-scala

A minimal seed template for a Scala build
HTML
6
star
43

prod-suite-management-doc

Scala
6
star
44

activator-reactive-java8-play

6
star
45

giter8-package

Package for g8 command line tool.
Scala
6
star
46

activator-scala-testing

An activator template
JavaScript
5
star
47

activator-template-cache

Creating and resolving templates for the activator project
Scala
5
star
48

typesafe-emojr

Reactive Emoji as a Service (EaaS) platform
HTML
5
star
49

sbt-echo

sbt plugin for echo tracing and activator
Scala
4
star
50

activator-hello-play-scala

HTML
4
star
51

conductr-doc

TeX
4
star
52

sbt-republish

Republish sbt's incremental compiler for Maven
Scala
4
star
53

activator-akka-scala-seed

A minimal seed template for an Akka with Scala build
Scala
3
star
54

elucidator

Activator analytics engine
Scala
3
star
55

activator-hello-play-2_3-scala

Scala
3
star
56

activator-hello-scala-2_11

HTML
3
star
57

activator-slick-direct

Slick Direct Embedding (Activator Template)
Scala
2
star
58

conductr-cassandra

Shell
2
star
59

play-eventsource-clock-java8

Activator template for the EventSource Clock sample for Java 8
2
star
60

scala-diff

A tool to compare the output (e.g. the generated distribution) of the Scala compiler project to check for stability
Scala
2
star
61

reactive-scales

JavaScript
1
star
62

going-reactive-with-java-8

JavaScript
1
star
63

typeclass-authorization

Simple Authorization Framework with Type Classes
Scala
1
star
64

injector

Injector is a simple tool that inserts additional files into existing jar archives
Scala
1
star
65

play-ebean-33-compat

Compatibility library for Play ebean 3.3.x support
Scala
1
star
66

sbt-scala-milestone

A plugin that helps sbt users release their libraries against Scala milestones.
Scala
1
star
67

activator-template-template

Scala
1
star
68

sbt-ad

Scala
1
star
69

sbt-nr

Scala
1
star
70

activator-tutorial-generator

Tutorial generator for Activator
Scala
1
star