{"action":"opened","issue":{"url":"https://api.github.com/repos/Moya/Moya/issues/513","repository_url":"https://api.github.com/repos/Moya/Moya","labels_url":"https://api.github.com/repos/Moya/Moya/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/Moya/Moya/issues/513/comments","events_url":"https://api.github.com/repos/Moya/Moya/issues/513/events","html_url":"https://github.com/Moya/Moya/issues/513","id":161036104,"number":513,"title":"Moya on swift 2.3","user":{"login":"aaroncrespo","id":431662,"avatar_url":"https://avatars.githubusercontent.com/u/431662?v=3","gravatar_id":"","url":"https://api.github.com/users/aaroncrespo","html_url":"https://github.com/aaroncrespo","followers_url":"https://api.github.com/users/aaroncrespo/followers","following_url":"https://api.github.com/users/aaroncrespo/following{/other_user}","gists_url":"https://api.github.com/users/aaroncrespo/gists{/gist_id}","starred_url":"https://api.github.com/users/aaroncrespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaroncrespo/subscriptions","organizations_url":"https://api.github.com/users/aaroncrespo/orgs","repos_url":"https://api.github.com/users/aaroncrespo/repos","events_url":"https://api.github.com/users/aaroncrespo/events{/privacy}","received_events_url":"https://api.github.com/users/aaroncrespo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-18T17:59:18Z","updated_at":"2016-06-18T17:59:18Z","closed_at":null,"body":"Took a crack at checking out swift 2.3 support this morning... \r\n\r\n### The good news:\r\n* Apple's migrator tool is great, after running on Moya, the demo target and tests (iOS,tvOS)  built and worked/passed\r\n* The changes don't look too bad from Moya's end\r\n* Foundation Value types and the new Swift API Guidelines don't come into play until Swift 3 which greatly limits changes.\r\n* swift 2 and 2.3 can live side by side with `#if swift(>=2.3) ...` \r\n\r\n### The meh news:\r\n* Nimble under macOS had some issues I've seen reported as Xcode/Foundation related -- affects macOS test target\r\n* xcodebuild doesn't pick up the swift legacy flag which triggers a compile against a 2.0 toolchain Xcode *should* in the future hopefully not do this. Until then `rake build` and `rake test` don't work without setting the TOOLCHAINS Environment flag. This is probably a bug in xcodebuild.\r\n* Relatedly Setting of the legacy swift flag is not performed by the migrator maybe because they want 2.0/2.3/3.0 to try and live side by side but that will cause weirdness with dependent projects.\r\n\r\nSo tracking what happened when I got it all building:\r\n\r\n- *Moya Changes:* \r\n- [ ] A couple URL API's changed nullability. Should check documentation and expectations and see if implicitly unwrapped is safe. Most are similar to:\r\n```diff\r\n public func url(route: TargetType) -> String {\r\n-    return route.baseURL.URLByAppendingPathComponent(route.path).absoluteString\r\n+    return route.baseURL.URLByAppendingPathComponent(route.path)!.absoluteString!\r\n }\r\n```\r\n- [ ] Decision on setting Swift Legacy flags. 2.0 and 2.3 coexisting is great, but value types + API guideline changes are not a small change. (probably breaking or a lot of fixme writing)\r\n- *Dependencies*\r\n- [ ] Alamofire:  https://github.com/Alamofire/Alamofire/pull/1313\r\n- [ ] Result: GTG\r\n- [ ] Quick/Nimble: https://github.com/Quick/Quick/issues/55, https://github.com/Quick/Nimble/pull/302\r\n- [ ] RxSwift: ??\r\n- [ ] ReactiveCocoa: ?? some small attribute updates -- Don't know if they have an issue yet.\r\n\r\nP.S. It's been a while since I ran Moya in dev mode and it took me a little while to get oriented, do you guys think a quick *Getting Started With Developing Moya* section somewhere would be useful? maybe #270. I don't really use rake for build scripting so it took a bit to get that setup."}}
{"actor":{"display_login":"aaroncrespo"}}