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
Upon building the app in Xcode I expected it to compile, launch the tests, and successfully fail the test.
What actually happened instead?
The app failed building with the following message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_XCTestCase", referenced from:
_OBJC_CLASS_$__QuickSpecBase in QuickSpecBase.o
"_OBJC_METACLASS_$_XCTestCase", referenced from:
_OBJC_METACLASS_$__QuickSpecBase in QuickSpecBase.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Environment
List the software versions you're using:
Quick: 1.2.0
Nimble: 7.0.2
Xcode Version: Version 9.0 (9A235)
Swift Version: Xcode Default
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Swift Package Manager Apple Swift Package Manager - Swift 4.0.0-dev (swiftpm-13126)
Looks like that is related to swiftlang/swift-package-manager#955. Without CLANG_ENABLE_MODULES=YES we can't link to XCTest framework. So this would not be our fault unfortunately.
If someone is still experiencing the problem and want to use Quick/Nimble in a SPM-project, I have a tool called spm_utils that fixes that. Just install it and then run:
What did you do?
I installed Quick & Nimble in my server side Swift Vapor project using the following Swift package manager file:
Then I created the following failing spec:
What did you expect to happen?
Upon building the app in Xcode I expected it to compile, launch the tests, and successfully fail the test.
What actually happened instead?
The app failed building with the following message:
Environment
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Project that demonstrates the issue
https://github.com/alexvbush/tw-music-app-api-vapor
Note:
running
swift test
successfully compiles and runs the tests, something is wrong with xcode setup.The text was updated successfully, but these errors were encountered: