Don't fail when create IncrementalCacheImpl for target without output directory, and fail when try to use this info instead.

#KT-10505 Fixed
This commit is contained in:
Zalim Bashorov
2016-01-13 14:25:23 +03:00
parent d9af9472f0
commit c1dbfee2a9
7 changed files with 55 additions and 1 deletions
@@ -103,7 +103,7 @@ class IncrementalCacheImpl(
private val supertypesMap = registerExperimentalMap(SupertypesMap(SUPERTYPES.storageFile))
private val dependents = arrayListOf<IncrementalCacheImpl>()
private val outputDir = requireNotNull(target.outputDir) { "Target is expected to have output directory: $target" }
private val outputDir by lazy(LazyThreadSafetyMode.NONE) { requireNotNull(target.outputDir) { "Target is expected to have output directory: $target" } }
private val dependentsWithThis: Sequence<IncrementalCacheImpl>
get() = sequenceOf(this).plus(dependents.asSequence())