IC: Fix CacheVersionsManager IC flag set.

Previously flag was set before the IncrementalCompilation.isEnabledForJvm() system property was set.
This cases that the cache versions was not saved.
This commit is contained in:
Sergey Rostov
2018-08-31 13:17:05 +03:00
parent 5f18439442
commit cdcc588a55
2 changed files with 4 additions and 5 deletions
@@ -38,13 +38,13 @@ fun makeJsIncrementally(
messageCollector: MessageCollector = MessageCollector.NONE,
reporter: ICReporter = EmptyICReporter
) {
val isIncremental = IncrementalCompilation.isEnabledForJs()
val versions = commonCacheVersionsManagers(cachesDir, isIncremental) + standaloneCacheVersionManager(cachesDir, isIncremental)
val allKotlinFiles = sourceRoots.asSequence().flatMap { it.walk() }
.filter { it.isFile && it.extension.equals("kt", ignoreCase = true) }.toList()
val buildHistoryFile = File(cachesDir, "build-history.bin")
withJsIC {
val versions = commonCacheVersionsManagers(cachesDir, true) + standaloneCacheVersionManager(cachesDir, true)
val compiler = IncrementalJsCompilerRunner(
cachesDir, versions, reporter,
buildHistoryFile = buildHistoryFile,
@@ -57,9 +57,6 @@ fun makeIncrementally(
messageCollector: MessageCollector = MessageCollector.NONE,
reporter: ICReporter = EmptyICReporter
) {
val isIncremental = IncrementalCompilation.isEnabledForJvm()
val versions = commonCacheVersionsManagers(cachesDir, isIncremental) + standaloneCacheVersionManager(cachesDir, isIncremental)
val kotlinExtensions = listOf("kt", "kts")
val allExtensions = kotlinExtensions + listOf("java")
val rootsWalk = sourceRoots.asSequence().flatMap { it.walk() }
@@ -68,6 +65,8 @@ fun makeIncrementally(
val buildHistoryFile = File(cachesDir, "build-history.bin")
withIC {
val versions = commonCacheVersionsManagers(cachesDir, true) + standaloneCacheVersionManager(cachesDir, true)
val compiler = IncrementalJvmCompilerRunner(
cachesDir,
sourceRoots.map { JvmSourceRoot(it, null) }.toSet(),