Refactor daemon interface

This commit is contained in:
Alexey Tsvetkov
2016-12-28 21:04:25 +03:00
parent d19a92bab5
commit d4d1d5ad0f
16 changed files with 461 additions and 84 deletions
@@ -71,14 +71,14 @@ private object EmptyICReporter : ICReporter {
}
}
private inline fun withIC(fn: ()->Unit) {
inline fun <R> withIC(fn: ()->R): R {
val isEnabledBackup = IncrementalCompilation.isEnabled()
val isExperimentalBackup = IncrementalCompilation.isExperimental()
IncrementalCompilation.setIsEnabled(true)
IncrementalCompilation.setIsExperimental(true)
try {
fn()
return fn()
}
finally {
IncrementalCompilation.setIsEnabled(isEnabledBackup)
@@ -128,7 +128,7 @@ class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() {
override fun report(message: ()->String) {
}
override fun reportCompileIteration(sourceFiles: Iterable<File>, exitCode: ExitCode) {
override fun reportCompileIteration(sourceFiles: Collection<File>, exitCode: ExitCode) {
compiledSources.addAll(sourceFiles)
resultExitCode = exitCode
}