log instead of assert for duplicate object identifiers

Summary: The `IGFailAssert` for duplicate object identifiers causes unit tests to fail in CI / IGListKit because assertions aren't silenced. Changing this to a log for now.

Reviewed By: rnystrom

Differential Revision: D8773452

fbshipit-source-id: 369415fda4ba3eef8fe8684dc792b0a9905a4759
This commit is contained in:
Adam Stern 2018-07-10 06:59:42 -07:00 committed by Facebook Github Bot
parent c5f64061a0
commit bee2178443
2 changed files with 3 additions and 1 deletions

View file

@ -21,6 +21,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag
- Ensuring view models with duplicate diff identifiers are removed when view models are first requested by `IGListBindingSectionController` [Adam Stern](https://github.com/adamastern) (tbd)
- Log instead of assert for duplicate diff identifiers to make code testable. [Adam Stern](https://github.com/adamastern) (tbd)
3.4.0
-----

View file

@ -25,7 +25,7 @@ static NSArray *objectsWithDuplicateIdentifiersRemoved(NSArray<id<IGListDiffable
[identifierMap setObject:object forKey:diffIdentifier];
[uniqueObjects addObject:object];
} else {
IGFailAssert(@"Duplicate identifier %@ for object %@ with object %@", diffIdentifier, object, previousObject);
IGLKLog(@"Duplicate identifier %@ for object %@ with object %@", diffIdentifier, object, previousObject);
}
}
return uniqueObjects;