{"action":"created","issue":{"url":"https://api.github.com/repos/Quick/Quick/issues/287","labels_url":"https://api.github.com/repos/Quick/Quick/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/Quick/Quick/issues/287/comments","events_url":"https://api.github.com/repos/Quick/Quick/issues/287/events","html_url":"https://github.com/Quick/Quick/pull/287","id":72357936,"number":287,"title":"Create QuickCore.framework","user":{"login":"modocache","id":552921,"avatar_url":"https://avatars.githubusercontent.com/u/552921?v=3","gravatar_id":"","url":"https://api.github.com/users/modocache","html_url":"https://github.com/modocache","followers_url":"https://api.github.com/users/modocache/followers","following_url":"https://api.github.com/users/modocache/following{/other_user}","gists_url":"https://api.github.com/users/modocache/gists{/gist_id}","starred_url":"https://api.github.com/users/modocache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modocache/subscriptions","organizations_url":"https://api.github.com/users/modocache/orgs","repos_url":"https://api.github.com/users/modocache/repos","events_url":"https://api.github.com/users/modocache/events{/privacy}","received_events_url":"https://api.github.com/users/modocache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-01T05:23:19Z","updated_at":"2015-05-04T20:45:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Quick/Quick/pulls/287","html_url":"https://github.com/Quick/Quick/pull/287","diff_url":"https://github.com/Quick/Quick/pull/287.diff","patch_url":"https://github.com/Quick/Quick/pull/287.patch"},"body":"**See individual commit messages for details on each change.**\r\n\r\nOne of Quick's greatest design flaws is due to the combination of four factors:\r\n\r\n1. Quick has a predilection for Swift--one of it's goals was to be written entirely in Swift if possible.\r\n2. Quick supports tests written in both Swift and Objective-C.\r\n3. XCTest relies upon subclassing for test discovery.\r\n4. Objective-C classes cannot subclass Swift base classes.\r\n\r\nAs such, Quick is unable to define QuickSpec, a base XCTestCase subclass, in Swift, and then have both Objective-C and Swift tests subclass QuickSpec.\r\n\r\nInstead, in order to be used from both Swift and Objective-C, QuickSpec must be implemented in Objective-C. This forces internal Quick code, such as Quick.World and Quick.ExampleGroup, to be marked as public. People using Quick to write tests were thus able to call Quick.World directly, even though that class is meant to be an implementation detail.\r\n\r\nIn order to mitigate this architectural flaw, create a new QuickCore.framework. Quick.framework has a dependency on QuickCore, but end-users are not exposed to the code in that framework unless they explicitly import it.\r\n\r\nI'm hoping that in a later commit, Quick.framework will be split up into two user-facing frameworks:\r\n\r\n1. Quick.framework, for clients writing tests in Swift.\r\n2. Objective-Quick.framework, for clients writing tests in Objective-C.\r\n\r\nBoth frameworks will define an XCTestCase subclass to be used in each language, and will internally use QuickCore.framework.\r\n\r\n---\r\n\r\nThis pull request introduces breaking changes: in order to use `QuickConfiguration` (and by extension, the shared examples feature), they'll have to import *both* Quick and QuickCore. This is because `Configuration` is defined in QuickCore. I'd really appreciate suggestions on how to avoid this breaking change."},"comment":{"url":"https://api.github.com/repos/Quick/Quick/issues/comments/98845474","html_url":"https://github.com/Quick/Quick/pull/287#issuecomment-98845474","issue_url":"https://api.github.com/repos/Quick/Quick/issues/287","id":98845474,"user":{"login":"paulyoung","id":84700,"avatar_url":"https://avatars.githubusercontent.com/u/84700?v=3","gravatar_id":"","url":"https://api.github.com/users/paulyoung","html_url":"https://github.com/paulyoung","followers_url":"https://api.github.com/users/paulyoung/followers","following_url":"https://api.github.com/users/paulyoung/following{/other_user}","gists_url":"https://api.github.com/users/paulyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/paulyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulyoung/subscriptions","organizations_url":"https://api.github.com/users/paulyoung/orgs","repos_url":"https://api.github.com/users/paulyoung/repos","events_url":"https://api.github.com/users/paulyoung/events{/privacy}","received_events_url":"https://api.github.com/users/paulyoung/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T20:45:39Z","updated_at":"2015-05-04T20:45:39Z","body":"> I'd really appreciate suggestions on how to avoid this breaking change.\r\n\r\nI haven't give this too much thought or looked into the implementation yet, but maybe you can use a forward declaration of `QuickConfiguration`."}}