{"action":"created","issue":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/65","repository_url":"https://api.github.com/repos/Instagram/IGListKit","labels_url":"https://api.github.com/repos/Instagram/IGListKit/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/Instagram/IGListKit/issues/65/comments","events_url":"https://api.github.com/repos/Instagram/IGListKit/issues/65/events","html_url":"https://github.com/Instagram/IGListKit/issues/65","id":182652671,"number":65,"title":"NSObject equality naming conflict","user":{"login":"iwasrobbed","id":317671,"avatar_url":"https://avatars.githubusercontent.com/u/317671?v=3","gravatar_id":"","url":"https://api.github.com/users/iwasrobbed","html_url":"https://github.com/iwasrobbed","followers_url":"https://api.github.com/users/iwasrobbed/followers","following_url":"https://api.github.com/users/iwasrobbed/following{/other_user}","gists_url":"https://api.github.com/users/iwasrobbed/gists{/gist_id}","starred_url":"https://api.github.com/users/iwasrobbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwasrobbed/subscriptions","organizations_url":"https://api.github.com/users/iwasrobbed/orgs","repos_url":"https://api.github.com/users/iwasrobbed/repos","events_url":"https://api.github.com/users/iwasrobbed/events{/privacy}","received_events_url":"https://api.github.com/users/iwasrobbed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Instagram/IGListKit/labels/question","name":"question","color":"D10869"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-12T22:44:58Z","updated_at":"2016-10-13T01:02:57Z","closed_at":null,"body":"## Issue\r\n\r\nSince this project extends `NSObject` to make it conform to `IGListDiffable` and that protocol has a method with a similar `isEqual` signature as the standard `NSObject` one, it is creating naming conflicts with other, completely unrelated, objects in the project that use the vanilla `isEqual` comparison.\r\n\r\n<img width=\"1082\" alt=\"screen shot 2016-10-12 at 3 42 44 pm\" src=\"https://cloud.githubusercontent.com/assets/317671/19330319/98fd04c8-9092-11e6-946f-c46e6a144075.png\">\r\n\r\nYou should consider uniquely naming the `IGListDiffable` method, e.g.:\r\n\r\n```objc\r\n- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object;\r\n```\r\n\r\nI looked into opening a PR for this, but honestly there are too many vague `isEqual` calls in the codebase so I'm not sure which should be the diffable equality check and which should be the vanilla `NSObject` ones.\r\n\r\n## New issue checklist\r\n\r\n- [x] I have reviewed the [`README`](https://github.com/Instagram/IGListKit/blob/master/README.md) and [documentation](http://instagram.github.io/IGListKit)\r\n- [x] I have searched [existing issues](https://github.com/Instagram/IGListKit/issues) and this is not a duplicate\r\n\r\n### General information\r\n\r\n- Library version(s): 1.0.0\r\n- ~~iOS version(s):~~\r\n- ~~Devices/Simulators affected:~~\r\n- Reproducible in the demo project? (Yes/No): N/A\r\n- ~~Related issues:~~\r\n"},"comment":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/comments/253382225","html_url":"https://github.com/Instagram/IGListKit/issues/65#issuecomment-253382225","issue_url":"https://api.github.com/repos/Instagram/IGListKit/issues/65","id":253382225,"user":{"login":"iwasrobbed","id":317671,"avatar_url":"https://avatars.githubusercontent.com/u/317671?v=3","gravatar_id":"","url":"https://api.github.com/users/iwasrobbed","html_url":"https://github.com/iwasrobbed","followers_url":"https://api.github.com/users/iwasrobbed/followers","following_url":"https://api.github.com/users/iwasrobbed/following{/other_user}","gists_url":"https://api.github.com/users/iwasrobbed/gists{/gist_id}","starred_url":"https://api.github.com/users/iwasrobbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwasrobbed/subscriptions","organizations_url":"https://api.github.com/users/iwasrobbed/orgs","repos_url":"https://api.github.com/users/iwasrobbed/repos","events_url":"https://api.github.com/users/iwasrobbed/events{/privacy}","received_events_url":"https://api.github.com/users/iwasrobbed/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T01:02:57Z","updated_at":"2016-10-13T01:02:57Z","body":"re: `@nonobjc`: Ultimately, the compiler is not able to find the vanilla `isEqual` method since it's being overwritten by the diffable version, so the annotation doesn't help unfortunately.\r\n\r\nLooks to be fixed in Swift 3.0 since it disambiguates the two equality functions.\r\n\r\nFeel free to close, but I imagine a lot of people will be stuck on Swift 2.3 for a bit longer. At the very least, may be worth specifying this via a `.swift-version` file and README."}}
{"actor":{"display_login":"iwasrobbed"}}