mirror of https://github.com/sbt/sbt.git
Introduce incremental compiler options.
Introduce a way to configure incremental compiler itself instead
of underlying Java/Scala compiler.
Specific list of changes in this commit:
* Add a method to `xsbti.compile.Setup` that returns incremental
compiler options as a `java.util.Map<String, String>`. We considered
statis interface instead of a `Map` but based on mailing
list feedback we decided that it's not the best way to go because
static interface is hard to evolve it by adding new options.
* Since passing `java.util.Map<String, String>` not very convenient
we convert it immediately to `sbt.inc.IncOptions`
* Add options argument to various methods/classes that implement
incremental compilation so in the end options reach
`sbt.inc.IncOptions` object
* Add `incOptions` task that allows users to configure incremental
compiler options in their build files. Default implementation of
that tasks returns just `IncOptions.DEFAULT`
* Both system property `xsbt.inc.debug` and `IncOptions.relationsDebug`
trigger debugging of relations now. In the near future, we should
deprecate use of `xsbt.inc.debug`.
This commit is contained in:
parent
7c5d4c1692
commit
39428a996d
|
|
@ -1,6 +1,8 @@
|
|||
package xsbti.compile;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import xsbti.Maybe;
|
||||
import xsbti.Reporter;
|
||||
|
||||
|
|
@ -30,4 +32,16 @@ public interface Setup<Analysis>
|
|||
|
||||
/** The reporter that should be used to report scala compilation to. */
|
||||
Reporter reporter();
|
||||
|
||||
/**
|
||||
* Returns incremental compiler options.
|
||||
*
|
||||
* @see sbt.inc.IncOptions for details
|
||||
*
|
||||
* You can get default options by calling <code>sbt.inc.IncOptions.toStringMap(sbt.inc.IncOptions.Default)</code>.
|
||||
*
|
||||
* In the future, we'll extend API in <code>xsbti</code> to provide factory methods that would allow to obtain
|
||||
* defaults values so one can depend on <code>xsbti</code> package only.
|
||||
**/
|
||||
Map<String, String> incrementalCompilerOptions();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue