Minor: fix typo EventManger->EventManager
This commit is contained in:
@@ -73,11 +73,11 @@ interface CompilerSelector {
|
|||||||
operator fun get(targetPlatform: CompileService.TargetPlatform): CLICompiler<*>
|
operator fun get(targetPlatform: CompileService.TargetPlatform): CLICompiler<*>
|
||||||
}
|
}
|
||||||
|
|
||||||
interface EventManger {
|
interface EventManager {
|
||||||
fun onCompilationFinished(f : () -> Unit)
|
fun onCompilationFinished(f : () -> Unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
private class EventMangerImpl : EventManger {
|
private class EventManagerImpl : EventManager {
|
||||||
private val onCompilationFinished = arrayListOf<() -> Unit>()
|
private val onCompilationFinished = arrayListOf<() -> Unit>()
|
||||||
|
|
||||||
override fun onCompilationFinished(f: () -> Unit) {
|
override fun onCompilationFinished(f: () -> Unit) {
|
||||||
@@ -659,12 +659,12 @@ class CompileServiceImpl(
|
|||||||
compilerMessagesStreamProxy: RemoteOutputStream,
|
compilerMessagesStreamProxy: RemoteOutputStream,
|
||||||
serviceOutputStreamProxy: RemoteOutputStream,
|
serviceOutputStreamProxy: RemoteOutputStream,
|
||||||
operationsTracer: RemoteOperationsTracer?,
|
operationsTracer: RemoteOperationsTracer?,
|
||||||
body: (PrintStream, EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
body: (PrintStream, EventManager, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
||||||
ifAlive {
|
ifAlive {
|
||||||
withValidClientOrSessionProxy(sessionId) { session ->
|
withValidClientOrSessionProxy(sessionId) { session ->
|
||||||
operationsTracer?.before("compile")
|
operationsTracer?.before("compile")
|
||||||
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
||||||
val eventManger = EventMangerImpl()
|
val eventManger = EventManagerImpl()
|
||||||
val compilerMessagesStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(compilerMessagesStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
|
val compilerMessagesStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(compilerMessagesStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
|
||||||
val serviceOutputStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(serviceOutputStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
|
val serviceOutputStream = PrintStream(BufferedOutputStream(RemoteOutputStreamClient(serviceOutputStreamProxy, rpcProfiler), REMOTE_STREAM_BUFFER_SIZE))
|
||||||
try {
|
try {
|
||||||
@@ -689,12 +689,12 @@ class CompileServiceImpl(
|
|||||||
private fun doCompile(sessionId: Int,
|
private fun doCompile(sessionId: Int,
|
||||||
daemonMessageReporter: DaemonMessageReporter,
|
daemonMessageReporter: DaemonMessageReporter,
|
||||||
tracer: RemoteOperationsTracer?,
|
tracer: RemoteOperationsTracer?,
|
||||||
body: (EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
body: (EventManager, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
||||||
ifAlive {
|
ifAlive {
|
||||||
withValidClientOrSessionProxy(sessionId) { session ->
|
withValidClientOrSessionProxy(sessionId) { session ->
|
||||||
tracer?.before("compile")
|
tracer?.before("compile")
|
||||||
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
||||||
val eventManger = EventMangerImpl()
|
val eventManger = EventManagerImpl()
|
||||||
try {
|
try {
|
||||||
val exitCode = checkedCompile(daemonMessageReporter, rpcProfiler) {
|
val exitCode = checkedCompile(daemonMessageReporter, rpcProfiler) {
|
||||||
body(eventManger, rpcProfiler).code
|
body(eventManger, rpcProfiler).code
|
||||||
@@ -708,10 +708,10 @@ class CompileServiceImpl(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createCompileServices(facade: CompilerCallbackServicesFacade, eventManger: EventManger, rpcProfiler: Profiler): Services {
|
private fun createCompileServices(facade: CompilerCallbackServicesFacade, eventManager: EventManager, rpcProfiler: Profiler): Services {
|
||||||
val builder = Services.Builder()
|
val builder = Services.Builder()
|
||||||
if (facade.hasIncrementalCaches() || facade.hasLookupTracker()) {
|
if (facade.hasIncrementalCaches() || facade.hasLookupTracker()) {
|
||||||
builder.register(IncrementalCompilationComponents::class.java, RemoteIncrementalCompilationComponentsClient(facade, eventManger, rpcProfiler))
|
builder.register(IncrementalCompilationComponents::class.java, RemoteIncrementalCompilationComponentsClient(facade, eventManager, rpcProfiler))
|
||||||
}
|
}
|
||||||
if (facade.hasCompilationCanceledStatus()) {
|
if (facade.hasCompilationCanceledStatus()) {
|
||||||
builder.register(CompilationCanceledStatus::class.java, RemoteCompilationCanceledStatusClient(facade, rpcProfiler))
|
builder.register(CompilationCanceledStatus::class.java, RemoteCompilationCanceledStatusClient(facade, rpcProfiler))
|
||||||
|
|||||||
+2
-2
@@ -25,8 +25,8 @@ import org.jetbrains.kotlin.daemon.common.DummyProfiler
|
|||||||
import org.jetbrains.kotlin.daemon.common.Profiler
|
import org.jetbrains.kotlin.daemon.common.Profiler
|
||||||
|
|
||||||
|
|
||||||
class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacade, eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents {
|
class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents {
|
||||||
val remoteLookupTrackerClient = RemoteLookupTrackerClient(facade, eventManger, profiler)
|
val remoteLookupTrackerClient = RemoteLookupTrackerClient(facade, eventManager, profiler)
|
||||||
|
|
||||||
override fun getIncrementalCache(target: TargetId): IncrementalCache = RemoteIncrementalCacheClient(facade, target, profiler)
|
override fun getIncrementalCache(target: TargetId): IncrementalCache = RemoteIncrementalCacheClient(facade, target, profiler)
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.incremental.components.Position
|
|||||||
import org.jetbrains.kotlin.incremental.components.ScopeKind
|
import org.jetbrains.kotlin.incremental.components.ScopeKind
|
||||||
|
|
||||||
|
|
||||||
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManger: EventManger, val profiler: Profiler = DummyProfiler()) : LookupTracker {
|
class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : LookupTracker {
|
||||||
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
|
private val isDoNothing = profiler.withMeasure(this) { facade.lookupTracker_isDoNothing() }
|
||||||
|
|
||||||
private val lookups = hashSetOf<LookupInfo>()
|
private val lookups = hashSetOf<LookupInfo>()
|
||||||
@@ -45,7 +45,7 @@ class RemoteLookupTrackerClient(val facade: CompilerCallbackServicesFacade, even
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
eventManger.onCompilationFinished { flush() }
|
eventManager.onCompilationFinished { flush() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun flush() {
|
private fun flush() {
|
||||||
|
|||||||
Reference in New Issue
Block a user