mirror of https://github.com/sbt/sbt.git
basis for a resident compiler
unstable, but can be tested with -Dsbt.resident.limit=n n is the maximum Globals kept around
This commit is contained in:
parent
dd78d17335
commit
c6c6061639
|
|
@ -0,0 +1,11 @@
|
|||
package xsbti.compile;
|
||||
|
||||
import xsbti.AnalysisCallback;
|
||||
import xsbti.Logger;
|
||||
import xsbti.Reporter;
|
||||
import java.io.File;
|
||||
|
||||
public interface CachedCompiler
|
||||
{
|
||||
public void run(File[] sources, DependencyChanges cpChanges, AnalysisCallback callback, Logger log, Reporter delegate);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package xsbti.compile;
|
||||
|
||||
import xsbti.Logger;
|
||||
import xsbti.Reporter;
|
||||
|
||||
public interface CachedCompilerProvider
|
||||
{
|
||||
ScalaInstance scalaInstance();
|
||||
CachedCompiler newCachedCompiler(String[] arguments, Logger log, Reporter reporter);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package xsbti.compile;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
// only includes changes to dependencies outside of the project
|
||||
public interface DependencyChanges
|
||||
{
|
||||
boolean isEmpty();
|
||||
// class files or jar files
|
||||
File[] modifiedBinaries();
|
||||
// class names
|
||||
String[] modifiedClasses();
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package xsbti.compile;
|
||||
|
||||
import xsbti.Logger;
|
||||
import xsbti.Reporter;
|
||||
|
||||
public interface GlobalsCache
|
||||
{
|
||||
public CachedCompiler apply(String[] args, boolean forceNew, CachedCompilerProvider provider, Logger log, Reporter reporter);
|
||||
public void clear();
|
||||
}
|
||||
|
|
@ -21,4 +21,6 @@ public interface Setup<Analysis>
|
|||
* This file can be removed to force a full recompilation.
|
||||
* The file should be unique and not shared between compilations. */
|
||||
File cacheFile();
|
||||
|
||||
GlobalsCache cache();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue