You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not quite sure what's going on, but @briancroom might! 😉 My open questions:
Why is swift build for Quick building Nimble as well? Shouldn't that only happen for swift test? (Forgive my ignorance here! Still learning about SwiftPM).
Thanks for bringing this up @modocache! I was actually looking at this exact thing just last night in hopes of making additional progress towards complete SwiftPM support. As to your questions:
Why is swift build for Quick building Nimble as well? Shouldn't that only happen for swift test? (Forgive my ignorance here! Still learning about SwiftPM).
This is because Quick and Nimble both currently target the version of SwiftPM included in the DEVELOPMENT-SNAPSHOT-2016-02-08-a release which does not yet include swift test. Because of that, the only way for the Quick and Nimble test suites to be built is to treat them as first-class products of the packages, which in turn requires Nimble to be a dependency of the Quick package. (See also https://github.com/Quick/Quick/blob/master/Package.swift#L10)
Why isn't swift build able to link XCTest?
The XCTest framework on Darwin isn't a proper SDK framework, and is located at a different location within the Platform directory structure than frameworks like Foundation. This particular issue can be worked around by adding search paths as follows:
...although there are a couple of other issues beyond that that still prevent the build from succeeding.
I've started work on branches (just here for now) which depend on building SwiftPM from master to gain access to swift test and should eventually fix up these issues. I'll open PRs in due time once the next round of snapshots are released and I get things cleaned up a little. I would also definitely be in favor of adding a SwiftPM OSX job to CI as well.
Awesome, thanks for all the info! I'm hoping to get more familiar with swiftpm soon. In the meantime, glad to see our swiftpm integration in such capable hands. 💯
Nimble master now fully supports swift test on both OS X and Linux, and is tested on CI using swift test on both platforms 🎉 I'm really excited about this, and since swift test is so bleeding edge, I believe we are among the first libraries to integrate with it this thoroughly. Note though that we'll still have to cut a release for SwiftPM to do the right thing when other packages depend on it.
I have begun hacking on a branch for Quick, but with much less progress. On the OS X side, I believe we are blocked until this proposal gets implemented within SwiftPM, because hooking into Xcode's XCTest like QuickSpec needs to requires the use of NSInvocation which is unavailable from Swift. On Linux I'm running into a compiler crasher that I haven't had time to dig into yet.
Another challenge to address for Quick will be the fact that it has two test suites (QuickTests and QuickFocusedTests) which need to be built and run independently because of the way that global state is used in them. swift test doesn't currently support the concept of multiple independent test suites, however, so some sort of workaround will be needed.
I"m looking forward to making more progress here soon. Stay tuned!
I've got a few more days where I'm happy to share knowledge here 😄
To be honest, I didn't take the time to work much further on this since my previous comment, however I do know that SwiftPM does now support building Objective-C modules, so it should be feasible to arrange the code such that SwiftPM builds a framework including the code required to integrate with Apple XCTest.
I'm not sure about the state of multiple test suites within a single SwiftPM package. Perhaps @aciidb0mb3r@ddunbar or @czechboy0 would have something to share on that point?
multiple test modules with objc and swift should be ok as long as there is no c language sources mixed with swift sources.
I get errored out on this because Nimble(3.1.1) doesn't seem to be arranged for SwiftPM right now.
Activity
modocache commentedon Feb 24, 2016
Also, I hadn't realized that
swift buildon OS X was "a thing". We should add this case to the CI matrix if it's something we care about.briancroom commentedon Feb 24, 2016
Thanks for bringing this up @modocache! I was actually looking at this exact thing just last night in hopes of making additional progress towards complete SwiftPM support. As to your questions:
This is because Quick and Nimble both currently target the version of SwiftPM included in the
DEVELOPMENT-SNAPSHOT-2016-02-08-arelease which does not yet includeswift test. Because of that, the only way for the Quick and Nimble test suites to be built is to treat them as first-class products of the packages, which in turn requires Nimble to be a dependency of the Quick package. (See also https://github.com/Quick/Quick/blob/master/Package.swift#L10)The XCTest framework on Darwin isn't a proper SDK framework, and is located at a different location within the Platform directory structure than frameworks like Foundation. This particular issue can be worked around by adding search paths as follows:
...although there are a couple of other issues beyond that that still prevent the build from succeeding.
I've started work on branches (just here for now) which depend on building SwiftPM from master to gain access to
swift testand should eventually fix up these issues. I'll open PRs in due time once the next round of snapshots are released and I get things cleaned up a little. I would also definitely be in favor of adding a SwiftPM OSX job to CI as well.modocache commentedon Feb 24, 2016
Awesome, thanks for all the info! I'm hoping to get more familiar with swiftpm soon. In the meantime, glad to see our swiftpm integration in such capable hands. 💯
briancroom commentedon Feb 29, 2016
Just a quick update on this:
Nimble master now fully supports
swift teston both OS X and Linux, and is tested on CI usingswift teston both platforms 🎉 I'm really excited about this, and sinceswift testis so bleeding edge, I believe we are among the first libraries to integrate with it this thoroughly. Note though that we'll still have to cut a release for SwiftPM to do the right thing when other packages depend on it.I have begun hacking on a branch for Quick, but with much less progress. On the OS X side, I believe we are blocked until this proposal gets implemented within SwiftPM, because hooking into Xcode's XCTest like
QuickSpecneeds to requires the use ofNSInvocationwhich is unavailable from Swift. On Linux I'm running into a compiler crasher that I haven't had time to dig into yet.Another challenge to address for Quick will be the fact that it has two test suites (
QuickTestsandQuickFocusedTests) which need to be built and run independently because of the way that global state is used in them.swift testdoesn't currently support the concept of multiple independent test suites, however, so some sort of workaround will be needed.I"m looking forward to making more progress here soon. Stay tuned!
istx25 commentedon Aug 10, 2016
@briancroom: How is this coming?
modocache commentedon Aug 10, 2016
@briancroom mentioned in an email to Quick contributors a while back that he won't be able to contribute to the project for the foreseeable future. 💡
istx25 commentedon Aug 10, 2016
Ah okay! I wasn't around for that. My bad. I'll see what I can do with these later down the road.
briancroom commentedon Aug 11, 2016
I've got a few more days where I'm happy to share knowledge here 😄
To be honest, I didn't take the time to work much further on this since my previous comment, however I do know that SwiftPM does now support building Objective-C modules, so it should be feasible to arrange the code such that SwiftPM builds a framework including the code required to integrate with Apple XCTest.
I'm not sure about the state of multiple test suites within a single SwiftPM package. Perhaps @aciidb0mb3r @ddunbar or @czechboy0 would have something to share on that point?
aciidgh commentedon Aug 11, 2016
multiple test modules with objc and swift should be ok as long as there is no c language sources mixed with swift sources.
I get errored out on this because Nimble(3.1.1) doesn't seem to be arranged for SwiftPM right now.
ikesyo commentedon Jul 21, 2017
Resolved by #687.