New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-14788] Linker error when code coverage is turned on for Swift Package with Objective-C code #57137
Comments
@swift-ci create |
Well this doesn't looking promising... do most people not use coverage or is there another solution for this? |
Our "solution" was to rewrite the Objective-C parts in Swift, which we were planning to do anyway. I haven't found an actual solution. |
That's disappointing. Unfortunately in my case the swift package is a 3rd party library written in objective c... I don't really want to re-write that myself 😆 Thanks for replying all the same 👍 |
Hey. I'm not sure if it's the same situcation but I think It can be help for someone who are in the same situation with me.
now My tests are running successfully. |
Strangely enough, I believe this issue has actually been fixed in the Xcode 14 beta 🤯🥳 |
We confirmed with Apple there was a fix applied in Xcode 14 beta. It was mentioned you need to gather coverage for a specific target to get it to work. |
works for iOS, |
Attachment: Download
Environment
MacBook Pro (16-inch, 2019)
macOS 11.4 (20F71)
Xcode 12.5 (12E262)
Also tested on Xcode 13 beta (13A5154h) - same behavior
Additional Detail from JIRA
md5: 8237f6f0bb4f6617b02c4b4189baff4e
Issue Description:
Setup:
Orbit - a package with Swift code
SharedUIObjC - a package with Objective-C code that depends on Orbit
Open the package file for SharedUIObjC in Xcode, build for iOS simulator.
When code coverage is turned off, build for testing works.
When it is turned on, linking fails with
The text was updated successfully, but these errors were encountered: