Adding as a dependency do swift package is breaking code coverage calculations.
After adding OpenHealthCardKit as a dependency to any swift package, Xcode stops generating code coverage. We're using latest Xcode version and I've found similar issue in this topic: https://developer.apple.com/forums/thread/770289 it looks like OpenHealthCardKit or its dependencies are built using older version of Xcode. Steps to reproduce:
- Create dummy swift package with at least one test
- Running test is generating code coverage
- Add "https://github.com/gematik/ref-OpenHealthCardKit.git" as a dependency
- Tests no longer generates code coverage, and logs are printing: "Failed to merge raw profiles in directory [...] raw profile version mismatch: Profile uses raw profile format version = 8; expected version = 10 PLEASE update this tool to version in the raw profile, or regenerate raw profile with expected version. error: no profile can be merged"
I have the same issue
Thanks for the pointer to the Apple forums.
It suggests that the issue probably lies with the upstream dependency https://github.com/gematik/OpenSSL-Swift binary, which indeed was built by Xcode 16.0.
I'll make a release with the binary rebuilt by Xcode 16.4 and update OpenHealthCardKit accordingly. This should hopefully solve the issue
@sigabrtz Hello! Have you released the fix? I updated to 5.11.2 and problem is still there
sry, I've posted to a wrong thread. As far as I know 5.11.2 did not include this particular fix but was meant for another issue.
Correct, 5.11.2 doesn't solve this bug. There was a (potential) issue with the the transitive OpenSSL-Swift binary release (https://github.com/gematik/OpenSSL-Swift/pull/30). I'll give an update soon.
I published the OpenSSL-Swift release with a binary attached that was built by Xcode 16.4. If your project resolves OpenSSL-Swift (transitively) to >= 4.6.0 it should contain the binary.
I don't use the code coverage feature myself, so I haven't personally verified whether the issue it ultimately resolved. I'd assume it as long as you don't report otherwise.
On my side. Code coverage finally works! Thank you very much! 😄