f-meloni / danger-swift-coverage

Show the coverage of the modified/created files on your PRs.
MIT License
85 stars 20 forks source link

[Help Needed] Fails to build on Bitrise #29

Closed el-hoshino closed 3 years ago

el-hoshino commented 3 years ago

It's very weird that from last week all my danger-swift workflows on Bitrise fails to build. I didn't change anything on Dangerfile.swift, and this plugin doesn't seem to have anything being changed either. But if I comment out the use of Coverage on my Dangerfile.swift, everything's OK.

Output of Danger-Swift step on Bitrise:

+ export DANGER_GITHUB_API_TOKEN=[REDACTED]
+ DANGER_GITHUB_API_TOKEN=[REDACTED]
+ danger-swift ci
objc[16933]: Class _TtC7OctoKit4File is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d35f3e0) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d3ed8). One of the two will be used. Which one is .

objc[16933]: Class _TtC7OctoKit4Gist is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d35f6b0) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d4198). One of the two will be used. Which one is .
objc[16933]: Class _TtC7OctoKit5Issue is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d35fae0) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d4610). One of the two will be used. Which one is .
objc[16933]: Class _TtC7OctoKit5Label is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d35ff50) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d4a28). One of the two will be used. Which one is undefined.
objc[16933]: Class _TtC7OctoKit9Milestone is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d360108) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d4bd0). One of the two will be used. Which one is undefined.
objc[16933]: Class _TtC7OctoKit11PullRequest is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d3604c8) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d5140). One of the two will be used. Which one is undefined.
objc[16933]: Class _TtC7OctoKit10Repository is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d3609f0) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d5820). One of the two will be used. Which one is undefined.
objc[16933]: Class _TtC7OctoKit4User is implemented in both /usr/local/Cellar/danger-swift/3.7.2/lib/danger/libDanger.dylib (0x10d360da0) and /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/x86_64-apple-macosx/debug/libDangerDependencies.dylib (0x10d0d5ee0). One of the two will be used. Which one is undefined.

'statement_level' has been renamed to 'function_level' and will be completely removed in a future release.

2021-02-16 07:06:45.487 xccov[16941:66880] Requested but did not find extension point with identifier Xcode.IDEFoundation.IDEResultKitSerializationConverter

Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/_tmp_dangerfile.swift -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -I /usr/local/lib/danger -I /Users/vagrant/.danger-swift/Scripts/Cache/-Users-vagrant-git-_dangerfile_imports/.build/debug -target-sdk-version 11.1 -module-name _tmp_dangerfile -lDangerDependencies -lDanger -- runner /snapshot/danger-js/distribution/commands/danger-ci.js --process danger-swift --passURLForDSL /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/danger-dsl.json /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/danger-response.json 
1.  Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
2.  While running user code "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/_tmp_dangerfile.swift"

0  swift                       0x0000000107bd9615 
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37

1  swift                       0x0000000107bd8615 llvm::sys::RunSignalHandlers() + 85

2  swift                       0x0000000107bd9bcf SignalHandler(int) + 111
3  libsystem_platform.dylib   
 0x00007fff6783c5fd _sigtramp + 29
4  libsystem_platform.dylib    0x0000000000000002 _sigtramp + 18446603338779474466
5  libDangerDependencies.dylib 0x000000010cfe4480 $s6Danger0A3DSLVWOh + 3184
6  libDangerDependencies.dylib 0x000000010cfe2f0c $s19DangerSwiftCoverage0C0O010xcodeBuildC0_07minimumC015excludedTargets011hideProjectC0yAC0C8PathTypeO_SfSaySSGSbtFZ + 652
7  libDangerDependencies.dylib 0x000000010d5904f0 $s19DangerSwiftCoverage0C0O010xcodeBuildC0_07minimumC015excludedTargets011hideProjectC0yAC0C8PathTypeO_SfSaySSGSbtFZ + 5953648

8  swift                       0x0000000103794a6f 
llvm::orc::runAsMain(int (*)(int, char**), llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::Optional<llvm::StringRef>) + 2495

9  swift                       0x0000000103771e5b swift::RunImmediately(swift::CompilerInstance&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, swift::IRGenOptions const&, swift::SILOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >&&) + 6747

10 swift                       0x000000010374cf7a performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 2426

11 swift                       0x000000010373cf4e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)
 + 21134

12 swift                       0x00000001036bdc27 main + 1255
13 libdyld.dylib               0x00007fff6763fcc9 start + 1

Cloning and building inline dependencies: import DangerXCodeSummary // package: https://github.com/f-meloni/danger-swift-xcodesummary.git, import DangerSwiftCoverage // package: https://github.com/f-meloni/danger-swift-coverage.git, import DangerSwiftHammer // package: https://github.com/el-hoshino/DangerSwiftHammer.git, this might take some time.
Updating packages...
Using https://github.com/f-meloni/danger-swift-xcodesummary.git latest major:1
Updating packages...
Using https://github.com/f-meloni/danger-swift-coverage.git latest major:1
Updating packages...
Using https://github.com/el-hoshino/DangerSwiftHammer.git latest major:0
Updating packages...
ERROR: Dangerfile eval failed at Dangerfile.swift

Command that seems to cause the failure:

Coverage.xcodeBuildCoverage(.xcresultBundle(processInfo.environment["BITRISE_XCRESULT_PATH"]), minimumCoverage: 60)

processInfo.environment["BITRISE_XCRESULT_PATH"] seems working fine when I tried to check the value:

/var/folders/......./Test.xcresult

Also if I try danger-swift pr locally it also works fine.

el-hoshino commented 3 years ago

I also tried this with my open source project and I got the same result: https://github.com/el-hoshino/HowAwayAreYou/pull/20

el-hoshino commented 3 years ago

Seems like Bitrise has fixed the issue by updating Homebrew 🎉