ref-OpenHealthCardKit icon indicating copy to clipboard operation
ref-OpenHealthCardKit copied to clipboard

Adding as a dependency do swift package is breaking code coverage calculations.

Open MarekNubisoft opened this issue 3 months ago • 4 comments

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"

MarekNubisoft avatar Oct 17 '25 12:10 MarekNubisoft

I have the same issue

AntonRomanchuk avatar Nov 21 '25 08:11 AntonRomanchuk

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 avatar Nov 21 '25 16:11 sigabrtz

@sigabrtz Hello! Have you released the fix? I updated to 5.11.2 and problem is still there

AntonRomanchuk avatar Dec 02 '25 14:12 AntonRomanchuk

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.

markusboesch avatar Dec 02 '25 14:12 markusboesch

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.

sigabrtz avatar Dec 02 '25 17:12 sigabrtz

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.

sigabrtz avatar Dec 12 '25 14:12 sigabrtz

On my side. Code coverage finally works! Thank you very much! 😄

MarekNubisoft avatar Dec 16 '25 09:12 MarekNubisoft