Fix IC with daemon
JPS IC with daemon was not working since
the commit 514635e965
Before that change `IncrementalCompilation.isEnabled`
returned `true` when the corresponding system property was not set.
After the change `isEnabled` returns `true` only if
the system property is set and equals to `"true"`.
The property was never set up for the daemon if `CompilerMode.JPS_COMPILER`
was used (the property was set up in a JPS process or in the daemon in case
it was used with Gradle).
#KT-19414 fixed
This commit is contained in:
+2
-2
@@ -71,9 +71,9 @@ private object EmptyICReporter : ICReporter {
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <R> withIC(fn: ()->R): R {
|
||||
inline fun <R> withIC(enabled: Boolean = true, fn: ()->R): R {
|
||||
val isEnabledBackup = IncrementalCompilation.isEnabled()
|
||||
IncrementalCompilation.setIsEnabled(true)
|
||||
IncrementalCompilation.setIsEnabled(enabled)
|
||||
|
||||
try {
|
||||
return fn()
|
||||
|
||||
Reference in New Issue
Block a user