Open salvatoreboemia opened 1 year ago
News on this issue on Xcode 14.3 and 14.3.1?
thanks
News? I tried also on Xcode 15 and GitHub, but I got the same error
With Xcode 14.2
Processing coverage file: /Users/runner/work/repo/repo/DerivedData/Build/ProfileData/
C9A-EA9C-4732-A6CD-ED50D/Coverage.profdata
With Xcode 14.3.x or Xcode 15
/usr/local/lib/ruby/gems/3.0.0/gems/slather-2.7.5/lib/slather/project.rb:239:in `
profdata_coverage_dir': No coverage directory found. (StandardError)
No one on this issue? @ksuther @marklarr
thanks
@salvatoreboemia I am having the same error, do you manage to solve it?
@salvatoreboemia I am having the same error, do you manage to solve it?
Not able to manage... I removed slather step
If you will find a fix please update this post.
Thanks
Before you do anything with your CI configuration please make sure that Xcode generates coverage report locally, in our case we didn't have this file generated, so it's not a surprise that slather did fail.
Please try to check build logs or test report (depending on the Xcode version you're using) if you can find similar error to this one
Showing All Messages
Failed to merge raw profiles in directory /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3 to destination /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3/Coverage.profdata: Aggregation tool '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata' failed with exit code 1: warning: /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3/997F01E3-3735-4897-AE00-31EBB0A9E8D3-57885.profraw: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged
If this is a case then solution described bellow might help you, I really hope it does.
We spent a lot of time debugging this problem, but none of the suggestions we found helped.
We tried to update our Podfile with these settings:
config.build_settings['CLANG_ENABLE_CODE_COVERAGE'] = 'NO'
config.build_settings['swiftc'] = '$(SRCROOT)/SWIFT_EXEC-no-coverage'
In our project Instrument Program Flow
& Generate Legacy Test Coverage
build settings were already set to NO
We also tried to change Mach-O type
for our cocoa pods dependencies to static library and many other things.
it appears that one of our dependencies was a binary (xcframework), most probably distributed via older version of the XCode, after updating it coverage was back.
I'm also facing this issue with Xcode 15.0 and 15.1. Would love to hear of a solution to this issue..
The solution is to make sure ALL of your upstream dependencies have been built with XCode 14.3 or newer. If ANY of your deps is not built with XCode 14.3 or newer, the .profraw file will be corrupt, so lldb-profdata will be unable to create a .prodata file for slather to parse. https://developer.apple.com/forums/thread/734611?answerId=775545022#775545022
I am currently facing the same issue. Any update on when this could get resolved?
@edward-sentongo Are you 100% sure it's not https://github.com/SlatherOrg/slather/issues/541#issuecomment-1883864542 ?
Does XCode show coverage % for all of the files you care about?
@jarrodlombardo-EventBase Xcode does show code coverage percentages for those files. I'll look into other solutions you suggested. Thanks
Issue Description
I upadated on GitHub my pipeline in order to use latest version of macOS and Xcode (13 and 14.3), but the slather scan failed (only with new macOS and Xcode version)
Command executed
Complete output when running fastlane, including the stack trace and command used
Environment
GitHub Env
Do you have any suggestions in order to fix this issue on GitHub and fastlane?
Thanks a lot