Skip to content

Commit

Permalink
log instead of assert for duplicate object identifiers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Adam Stern authored and facebook-github-bot committed Jul 10, 2018
1 parent c5f6406 commit bee2178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----

Expand Down
2 changes: 1 addition & 1 deletion Source/Common/Internal/IGListArrayUtilsInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bee2178

Please sign in to comment.