Adds Objective-C support for the SwiftPM version of Nimble
There's a lot of follow-on, entirely stemming from the fact that SwiftPM doesn't support mixed-language targets.
Creates a NimbleSharedTestHelpers internal target, used only for testing Swift and Objective-C. This should not be exported or used by others. This exists only in the SPM version for code-sharing purposes.
Separates the old Tests/NimbleTests/objc folder out into Tests/NimbleObjectiveCTests/
Converts a lot of #if SWIFT_PACKAGE to #if canImport(Darwin) (or with the equivalent !'ed versions), because now we do support Objective-C in SwiftPM.
SwiftPM users w/ objc tests will have to use both @import Nimble; and @import NimbleObjectiveC;
Capturing objective-c exceptions doesn't appear to be working. Still investigating why.
Failure messages are slightly different for the SwiftPM version of objective-c.
Todo
[ ] Write documentation on how to use this.
[ ] Further investigate what's going on with capturing objective-c exceptions in swiftpm.
Hi there, we recently updated nimble to the latest version and it seems this PR broke Swift WASM on macOS (as it's trying to build the NimbleObjectiveC which then fails).
I will open a ticket later.
Resolves https://github.com/Quick/Nimble/issues/989
There's a lot of follow-on, entirely stemming from the fact that SwiftPM doesn't support mixed-language targets.
NimbleSharedTestHelpers
internal target, used only for testing Swift and Objective-C. This should not be exported or used by others. This exists only in the SPM version for code-sharing purposes.Tests/NimbleTests/objc
folder out intoTests/NimbleObjectiveCTests/
#if SWIFT_PACKAGE
to#if canImport(Darwin)
(or with the equivalent!
'ed versions), because now we do support Objective-C in SwiftPM.@import Nimble;
and@import NimbleObjectiveC;
Todo