{"action":"opened","number":226,"pull_request":{"url":"https://api.github.com/repos/Quick/Nimble/pulls/226","id":54120397,"html_url":"https://github.com/Quick/Nimble/pull/226","diff_url":"https://github.com/Quick/Nimble/pull/226.diff","patch_url":"https://github.com/Quick/Nimble/pull/226.patch","issue_url":"https://api.github.com/repos/Quick/Nimble/issues/226","number":226,"state":"open","locked":false,"title":"[WIP] Swift Package Manager and Linux support","user":{"login":"briancroom","id":1062518,"avatar_url":"https://avatars.githubusercontent.com/u/1062518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancroom","html_url":"https://github.com/briancroom","followers_url":"https://api.github.com/users/briancroom/followers","following_url":"https://api.github.com/users/briancroom/following{/other_user}","gists_url":"https://api.github.com/users/briancroom/gists{/gist_id}","starred_url":"https://api.github.com/users/briancroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancroom/subscriptions","organizations_url":"https://api.github.com/users/briancroom/orgs","repos_url":"https://api.github.com/users/briancroom/repos","events_url":"https://api.github.com/users/briancroom/events{/privacy}","received_events_url":"https://api.github.com/users/briancroom/received_events","type":"User","site_admin":false},"body":"(See also https://github.com/Quick/Quick/pull/436 and https://github.com/Quick/Quick/pull/444)\r\n\r\nThis beast of a PR contains a first attempt at getting Nimble working on Linux using the [swift.org](https://swift.org) toolchain. At this point I would consider it effectively a proof of concept and not mergeable until the tools have a bit more time to bake and some of the workarounds can be removed.\r\n\r\nI took pains to make focused commits for easier review, but to summarize, the work consists of three main components:\r\n\r\n- [x] Support being built by the Swift Package Manager. This involved adding a `Package.swift` and adjusting the directory structure a little\r\n- [x] Remove/conditionalize classes and concepts that only work or make sense in an Objective-C context (e.g. the ObjC matchers, and the `raiseException` matcher)\r\n- [x] Add fixes/workarounds for a variety of compiler and framework issues that (currently?) prevent 100% source compatibility. These include:\r\n\r\n  - [ ] Missing `NSString(format:, ...)`\r\n  - [ ] Missing `NSHashTable` and `NSMapTable`\r\n  - [ ] Can't use `@objc` anywhere because the types provided by SwiftFoundation aren't considered ObjC. This ends up requiring a bunch of annoying duplication in `MatcherProtocols.swift`\r\n  - [ ] SwiftFoundation's `NSNumber` doesn't have `compare` yet\r\n  - [ ] SwiftFoundation's `NSString` doesn't have the overlays that make `rangeOfString` work with `Range<Index>`\r\n  - [ ] Can't coerce from `String` to `NSString` using the `as` operator ([SR-309](https://bugs.swift.org/browse/SR-309))\r\n  - [ ] SwiftXCTest's `XCTAssert` methods expect the `file:` parameter to be a `StaticString` instead of `String` ([SR-308](https://bugs.swift.org/browse/SR-308))\r\n  - [ ] Linking fails when declaring `NSObject` subclasses ([SR-272](https://bugs.swift.org/browse/SR-272))\r\n  - [ ] `NSString.stringByTrimmingCharactersInSet` is horribly broken in the current toolchain snapshot (https://github.com/apple/swift-corelibs-foundation/pull/160)\r\n\r\nSome pieces that are missing altogether but can hopefully be reintroduced are:\r\n\r\n- [ ] The `beAKindOf` matcher, because there is no replacement for `NSObject.isKindOfClass` in Swift right now\r\n- [ ] Everything related to async/polling/waiting, at least until `swift-corelibs-libdispatch` starts to be usable on Linux\r\n\r\nAt the tip of this branch, all the tests are passing on Mac through Xcode, and Nimble can be used as a dependency in SPM-based packages on Linux. There is no attempt at creating a test suite for Nimble on Linux yet.\r\n\r\nFeedback please :smile: @jeffh @modocache ","created_at":"2015-12-18T16:17:47Z","updated_at":"2015-12-18T16:17:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Quick/Nimble/pulls/226/commits","review_comments_url":"https://api.github.com/repos/Quick/Nimble/pulls/226/comments","review_comment_url":"https://api.github.com/repos/Quick/Nimble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Quick/Nimble/issues/226/comments","statuses_url":"https://api.github.com/repos/Quick/Nimble/statuses/86aa07c19fd6d771b603cd84294c77cea018b7a5","head":{"label":"briancroom:linux","ref":"linux","sha":"86aa07c19fd6d771b603cd84294c77cea018b7a5","user":{"login":"briancroom","id":1062518,"avatar_url":"https://avatars.githubusercontent.com/u/1062518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancroom","html_url":"https://github.com/briancroom","followers_url":"https://api.github.com/users/briancroom/followers","following_url":"https://api.github.com/users/briancroom/following{/other_user}","gists_url":"https://api.github.com/users/briancroom/gists{/gist_id}","starred_url":"https://api.github.com/users/briancroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancroom/subscriptions","organizations_url":"https://api.github.com/users/briancroom/orgs","repos_url":"https://api.github.com/users/briancroom/repos","events_url":"https://api.github.com/users/briancroom/events{/privacy}","received_events_url":"https://api.github.com/users/briancroom/received_events","type":"User","site_admin":false},"repo":{"id":38868206,"name":"Nimble","full_name":"briancroom/Nimble","owner":{"login":"briancroom","id":1062518,"avatar_url":"https://avatars.githubusercontent.com/u/1062518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancroom","html_url":"https://github.com/briancroom","followers_url":"https://api.github.com/users/briancroom/followers","following_url":"https://api.github.com/users/briancroom/following{/other_user}","gists_url":"https://api.github.com/users/briancroom/gists{/gist_id}","starred_url":"https://api.github.com/users/briancroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancroom/subscriptions","organizations_url":"https://api.github.com/users/briancroom/orgs","repos_url":"https://api.github.com/users/briancroom/repos","events_url":"https://api.github.com/users/briancroom/events{/privacy}","received_events_url":"https://api.github.com/users/briancroom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/briancroom/Nimble","description":"A Matcher Framework for Swift and Objective-C","fork":true,"url":"https://api.github.com/repos/briancroom/Nimble","forks_url":"https://api.github.com/repos/briancroom/Nimble/forks","keys_url":"https://api.github.com/repos/briancroom/Nimble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/briancroom/Nimble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/briancroom/Nimble/teams","hooks_url":"https://api.github.com/repos/briancroom/Nimble/hooks","issue_events_url":"https://api.github.com/repos/briancroom/Nimble/issues/events{/number}","events_url":"https://api.github.com/repos/briancroom/Nimble/events","assignees_url":"https://api.github.com/repos/briancroom/Nimble/assignees{/user}","branches_url":"https://api.github.com/repos/briancroom/Nimble/branches{/branch}","tags_url":"https://api.github.com/repos/briancroom/Nimble/tags","blobs_url":"https://api.github.com/repos/briancroom/Nimble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/briancroom/Nimble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/briancroom/Nimble/git/refs{/sha}","trees_url":"https://api.github.com/repos/briancroom/Nimble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/briancroom/Nimble/statuses/{sha}","languages_url":"https://api.github.com/repos/briancroom/Nimble/languages","stargazers_url":"https://api.github.com/repos/briancroom/Nimble/stargazers","contributors_url":"https://api.github.com/repos/briancroom/Nimble/contributors","subscribers_url":"https://api.github.com/repos/briancroom/Nimble/subscribers","subscription_url":"https://api.github.com/repos/briancroom/Nimble/subscription","commits_url":"https://api.github.com/repos/briancroom/Nimble/commits{/sha}","git_commits_url":"https://api.github.com/repos/briancroom/Nimble/git/commits{/sha}","comments_url":"https://api.github.com/repos/briancroom/Nimble/comments{/number}","issue_comment_url":"https://api.github.com/repos/briancroom/Nimble/issues/comments{/number}","contents_url":"https://api.github.com/repos/briancroom/Nimble/contents/{+path}","compare_url":"https://api.github.com/repos/briancroom/Nimble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/briancroom/Nimble/merges","archive_url":"https://api.github.com/repos/briancroom/Nimble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/briancroom/Nimble/downloads","issues_url":"https://api.github.com/repos/briancroom/Nimble/issues{/number}","pulls_url":"https://api.github.com/repos/briancroom/Nimble/pulls{/number}","milestones_url":"https://api.github.com/repos/briancroom/Nimble/milestones{/number}","notifications_url":"https://api.github.com/repos/briancroom/Nimble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/briancroom/Nimble/labels{/name}","releases_url":"https://api.github.com/repos/briancroom/Nimble/releases{/id}","created_at":"2015-07-10T07:50:13Z","updated_at":"2015-07-10T07:50:13Z","pushed_at":"2015-12-18T15:43:49Z","git_url":"git://github.com/briancroom/Nimble.git","ssh_url":"git@github.com:briancroom/Nimble.git","clone_url":"https://github.com/briancroom/Nimble.git","svn_url":"https://github.com/briancroom/Nimble","homepage":"","size":725,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"swift-2.0"}},"base":{"label":"Quick:master","ref":"master","sha":"7989d7e4ebc4d8d29adeb3acf88f4472a92a07f1","user":{"login":"Quick","id":8083968,"avatar_url":"https://avatars.githubusercontent.com/u/8083968?v=3","gravatar_id":"","url":"https://api.github.com/users/Quick","html_url":"https://github.com/Quick","followers_url":"https://api.github.com/users/Quick/followers","following_url":"https://api.github.com/users/Quick/following{/other_user}","gists_url":"https://api.github.com/users/Quick/gists{/gist_id}","starred_url":"https://api.github.com/users/Quick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quick/subscriptions","organizations_url":"https://api.github.com/users/Quick/orgs","repos_url":"https://api.github.com/users/Quick/repos","events_url":"https://api.github.com/users/Quick/events{/privacy}","received_events_url":"https://api.github.com/users/Quick/received_events","type":"Organization","site_admin":false},"repo":{"id":21301381,"name":"Nimble","full_name":"Quick/Nimble","owner":{"login":"Quick","id":8083968,"avatar_url":"https://avatars.githubusercontent.com/u/8083968?v=3","gravatar_id":"","url":"https://api.github.com/users/Quick","html_url":"https://github.com/Quick","followers_url":"https://api.github.com/users/Quick/followers","following_url":"https://api.github.com/users/Quick/following{/other_user}","gists_url":"https://api.github.com/users/Quick/gists{/gist_id}","starred_url":"https://api.github.com/users/Quick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quick/subscriptions","organizations_url":"https://api.github.com/users/Quick/orgs","repos_url":"https://api.github.com/users/Quick/repos","events_url":"https://api.github.com/users/Quick/events{/privacy}","received_events_url":"https://api.github.com/users/Quick/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Quick/Nimble","description":"A Matcher Framework for Swift and Objective-C","fork":false,"url":"https://api.github.com/repos/Quick/Nimble","forks_url":"https://api.github.com/repos/Quick/Nimble/forks","keys_url":"https://api.github.com/repos/Quick/Nimble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quick/Nimble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quick/Nimble/teams","hooks_url":"https://api.github.com/repos/Quick/Nimble/hooks","issue_events_url":"https://api.github.com/repos/Quick/Nimble/issues/events{/number}","events_url":"https://api.github.com/repos/Quick/Nimble/events","assignees_url":"https://api.github.com/repos/Quick/Nimble/assignees{/user}","branches_url":"https://api.github.com/repos/Quick/Nimble/branches{/branch}","tags_url":"https://api.github.com/repos/Quick/Nimble/tags","blobs_url":"https://api.github.com/repos/Quick/Nimble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quick/Nimble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quick/Nimble/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quick/Nimble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quick/Nimble/statuses/{sha}","languages_url":"https://api.github.com/repos/Quick/Nimble/languages","stargazers_url":"https://api.github.com/repos/Quick/Nimble/stargazers","contributors_url":"https://api.github.com/repos/Quick/Nimble/contributors","subscribers_url":"https://api.github.com/repos/Quick/Nimble/subscribers","subscription_url":"https://api.github.com/repos/Quick/Nimble/subscription","commits_url":"https://api.github.com/repos/Quick/Nimble/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quick/Nimble/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quick/Nimble/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quick/Nimble/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quick/Nimble/contents/{+path}","compare_url":"https://api.github.com/repos/Quick/Nimble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quick/Nimble/merges","archive_url":"https://api.github.com/repos/Quick/Nimble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quick/Nimble/downloads","issues_url":"https://api.github.com/repos/Quick/Nimble/issues{/number}","pulls_url":"https://api.github.com/repos/Quick/Nimble/pulls{/number}","milestones_url":"https://api.github.com/repos/Quick/Nimble/milestones{/number}","notifications_url":"https://api.github.com/repos/Quick/Nimble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quick/Nimble/labels{/name}","releases_url":"https://api.github.com/repos/Quick/Nimble/releases{/id}","created_at":"2014-06-28T11:28:38Z","updated_at":"2015-12-18T05:57:30Z","pushed_at":"2015-12-18T14:59:06Z","git_url":"git://github.com/Quick/Nimble.git","ssh_url":"git@github.com:Quick/Nimble.git","clone_url":"https://github.com/Quick/Nimble.git","svn_url":"https://github.com/Quick/Nimble","homepage":"","size":875,"stargazers_count":872,"watchers_count":872,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":21,"forks":135,"open_issues":21,"watchers":872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Quick/Nimble/pulls/226"},"html":{"href":"https://github.com/Quick/Nimble/pull/226"},"issue":{"href":"https://api.github.com/repos/Quick/Nimble/issues/226"},"comments":{"href":"https://api.github.com/repos/Quick/Nimble/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/Quick/Nimble/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/Quick/Nimble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Quick/Nimble/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/Quick/Nimble/statuses/86aa07c19fd6d771b603cd84294c77cea018b7a5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":19,"additions":283,"deletions":32,"changed_files":50}}