{"action":"created","issue":{"url":"https://api.github.com/repos/AliSoftware/Reusable/issues/20","repository_url":"https://api.github.com/repos/AliSoftware/Reusable","labels_url":"https://api.github.com/repos/AliSoftware/Reusable/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/AliSoftware/Reusable/issues/20/comments","events_url":"https://api.github.com/repos/AliSoftware/Reusable/issues/20/events","html_url":"https://github.com/AliSoftware/Reusable/pull/20","id":164225229,"number":20,"title":"Dual Swift 2 & 3 Support","user":{"login":"phatblat","id":28851,"avatar_url":"https://avatars.githubusercontent.com/u/28851?v=3","gravatar_id":"","url":"https://api.github.com/users/phatblat","html_url":"https://github.com/phatblat","followers_url":"https://api.github.com/users/phatblat/followers","following_url":"https://api.github.com/users/phatblat/following{/other_user}","gists_url":"https://api.github.com/users/phatblat/gists{/gist_id}","starred_url":"https://api.github.com/users/phatblat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phatblat/subscriptions","organizations_url":"https://api.github.com/users/phatblat/orgs","repos_url":"https://api.github.com/users/phatblat/repos","events_url":"https://api.github.com/users/phatblat/events{/privacy}","received_events_url":"https://api.github.com/users/phatblat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-07-07T04:01:05Z","updated_at":"2016-09-17T22:11:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AliSoftware/Reusable/pulls/20","html_url":"https://github.com/AliSoftware/Reusable/pull/20","diff_url":"https://github.com/AliSoftware/Reusable/pull/20.diff","patch_url":"https://github.com/AliSoftware/Reusable/pull/20.patch"},"body":"I missed a few API changes in #19. This change addresses those, but also retains Swift 2 support.\r\n\r\n- Added an `IdxPath` typealias to simplify support for multiple Swift versions (naming suggestions welcome)\r\n- Had to disable `EMBEDDED_CONTENT_CONTAINS_SWIFT` in the generated `Pods-ReusableDemo` target to fix weird errors. Regenerating the Pods project may reintroduce them.\r\n\r\nNote that there are 25 new warnings when building ReusableDemo in Xcode 7.\r\n\r\n> ⚠️ Extraneous '_' in parameter: 'cellType' has no keyword argument name\r\n> ⚠️ Extraneous '_' in parameter: 'viewType' has no keyword argument name\r\n\r\nI figure warnings in 7 are better than errors in 8 and also don't feel like adding another 25 temporary `#if swift(>=3.) ... #endif` blocks.\r\n\r\n## TODO\r\n\r\n- [ ] ~~Tests~~\r\n- [x] Travis build matrix\r\n- [x] Update the README.md to indicate support for Swift 2 & 3\r\n- [x] Add an entry in the CHANGELOG.md\r\n  - [x] Revert trailing whitespace removal\r\n  - [x] Add trailing whitespace to force wrap line\r\n- [x] Rename `IdxPath` -> `IndexPath`\r\n- [x] Refactor `post_install` hook in Podfile to use `installer` API instead of shelling out to `sed`\r\n- [x] Rebase on top of `master` to bring in changes from v2.5.0"},"comment":{"url":"https://api.github.com/repos/AliSoftware/Reusable/issues/comments/247811156","html_url":"https://github.com/AliSoftware/Reusable/pull/20#issuecomment-247811156","issue_url":"https://api.github.com/repos/AliSoftware/Reusable/issues/20","id":247811156,"user":{"login":"phatblat","id":28851,"avatar_url":"https://avatars.githubusercontent.com/u/28851?v=3","gravatar_id":"","url":"https://api.github.com/users/phatblat","html_url":"https://github.com/phatblat","followers_url":"https://api.github.com/users/phatblat/followers","following_url":"https://api.github.com/users/phatblat/following{/other_user}","gists_url":"https://api.github.com/users/phatblat/gists{/gist_id}","starred_url":"https://api.github.com/users/phatblat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phatblat/subscriptions","organizations_url":"https://api.github.com/users/phatblat/orgs","repos_url":"https://api.github.com/users/phatblat/repos","events_url":"https://api.github.com/users/phatblat/events{/privacy}","received_events_url":"https://api.github.com/users/phatblat/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T22:11:02Z","updated_at":"2016-09-17T22:11:02Z","body":"Note that there are a number of warnings when building in Xcode 8 with Swift 3:\r\n\r\n> 'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift\r\n\r\nThese can easily be fixed (see 049efcea05ddd941a13bcf51309ef59a0c1499d5), however the new syntax breaks Swift 2 support.\r\n\r\nOne approach would be to have two complete methods inside `#if swift(>=3.0) ... #else ... #endif`. However, I see that as dangerous because the swift `#if` blocks must surround blocks of compilable code. You can't just include the method signature line. So, it's easier to maintain support by having the two versions share the method signature and only the body differs.\r\n\r\nFor now, I just added `--allow-warnings` to the lint tasks, but eventually this should be addressed. It could be addressed by simply dropping Swift 2 support."}}
{"actor":{"display_login":"phatblat"}}