[workspace model utils] load resStore in StoreSnapshotsAnalyzer before other files

...because they may be absent if both 'left' and 'right' arguments of AbstractEntityStorage.reportConsistencyIssue are null.

GitOrigin-RevId: f4a45c94f320c185f1ffce35fc3cda16ff03c4df
This commit is contained in:
Nikolay Chashnikov
2021-04-06 16:00:29 +00:00
committed by intellij-monorepo-bot
parent dcf32052d0
commit e23c438ad0
@@ -45,11 +45,12 @@ fun main(args: Array<String>) {
serializer.deserializeClassToIntConverter(converterFile.inputStream())
val resStore = serializer.deserializeCache(resFile.inputStream())!!
val leftStore = serializer.deserializeCache(leftFile.inputStream()) ?: throw IllegalArgumentException("Cannot load cache")
val filterPattern = args.getOrNull(1)
if (filterPattern != null) {
val rightStore = serializer.deserializeCache(rightFile.inputStream())!!
val resStore = serializer.deserializeCache(resFile.inputStream())!!
val allEntitySources = leftStore.entitiesBySource { true }.map { it.key }.toHashSet()
allEntitySources.addAll(rightStore.entitiesBySource { true }.map { it.key })
@@ -63,7 +64,6 @@ fun main(args: Array<String>) {
}
else {
val rightStore = serializer.deserializeCacheAndDiffLog(rightFile.inputStream(), rightDiffLogFile.inputStream())!!
val resStore = serializer.deserializeCache(resFile.inputStream())!!
val expectedResult = leftStore.toBuilder()
expectedResult.addDiff(rightStore)