jps: fixes for KOTLIN-CR-2028
This commit is contained in:
+9
-6
@@ -117,17 +117,20 @@ class IncrementalJsCompilerRunner(
|
||||
}
|
||||
|
||||
override fun makeServices(
|
||||
args: K2JSCompilerArguments,
|
||||
lookupTracker: LookupTracker,
|
||||
expectActualTracker: ExpectActualTracker,
|
||||
caches: IncrementalJsCachesManager,
|
||||
compilationMode: CompilationMode
|
||||
args: K2JSCompilerArguments,
|
||||
lookupTracker: LookupTracker,
|
||||
expectActualTracker: ExpectActualTracker,
|
||||
caches: IncrementalJsCachesManager,
|
||||
compilationMode: CompilationMode
|
||||
): Services.Builder =
|
||||
super.makeServices(args, lookupTracker, expectActualTracker, caches, compilationMode).apply {
|
||||
register(IncrementalResultsConsumer::class.java, IncrementalResultsConsumerImpl())
|
||||
|
||||
if (compilationMode is CompilationMode.Incremental) {
|
||||
register(IncrementalDataProvider::class.java, IncrementalDataProviderFromCache(caches.platformCache))
|
||||
register(
|
||||
IncrementalDataProvider::class.java,
|
||||
IncrementalDataProviderFromCache(caches.platformCache)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.incremental.js
|
||||
|
||||
import org.jetbrains.kotlin.incremental.IncrementalJsCache
|
||||
import java.io.File
|
||||
|
||||
internal class IncrementalDataProviderFromCache(private val cache: IncrementalJsCache) : IncrementalDataProvider {
|
||||
override val headerMetadata: ByteArray
|
||||
get() = cache.header
|
||||
override val compiledPackageParts: Map<File, TranslationResultValue>
|
||||
get() = cache.nonDirtyPackageParts()
|
||||
}
|
||||
Reference in New Issue
Block a user