swift: Fails on Xcode 12
I’m still trying to debug why exactly it’s failing, but thought I’d post the issue here while I look into it in case someone else has seen the same thing.
Issue: Since switching to Xcode-12 beta, danger stopped working on bitrise (and locally). The command I’m running locally is:
swift run --package-path scripts/swift/Danger/ --build-path .build danger-swift pr {GITHUB_PR_URL} --dangerfile scripts/swift/Danger/DangerFilePreChecks.swift --verbose
And the result is:
Launching Danger Swift pr (v3.4.1)
Finding out where the danger executable is
Running: /usr/local/bin/danger pr --process .build/debug/danger-swift --passURLForDSL {GITHUB_PR_URL} --dangerfile scripts/swift/Danger/DangerFilePreChecks.swift --verbose --id PreChecks
Starting Danger PR on {GITHUB_PR_URL}
0 swift 0x000000011170aa85 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift 0x0000000111709a85 llvm::sys::RunSignalHandlers() + 85
2 swift 0x000000011170b03f SignalHandler(int) + 111
3 libsystem_platform.dylib 0x00007fff6d3625fd _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603338683898400
5 libswiftCore.dylib 0x00007fff6c911c0c $ss21__SharedStringStorageC13getCharacters_5rangeySpys6UInt16VG_So13_SwiftNSRangeatF + 172
6 libswiftCore.dylib 0x00007fff6c911d28
$ss21__SharedStringStorageC13getCharacters_5rangeySpys6UInt16VG_So13_SwiftNSRangeatFTo + 24
7 CoreFoundation 0x00007fff330a4a71 __CFStringEncodeByteStream + 1857
8 Foundation 0x00007fff35742268 -[NSString(NSStringOtherEncodings) lengthOfBytesUsingEncoding:] + 103
9 Foundation 0x00007fff3579f1aa -[NSPlaceholderString initWithString:] + 159
10 libswiftFoundation.dylib 0x00007fff6cc54886 $s10Foundation27_JSONKeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLV6encode_6forKeyySS_xtKF + 3430
11 libswiftFoundation.dylib 0x00007fff6cc5cf0e $s10Foundation27_JSONKeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLVyxGs05KeyedcD8ProtocolAAsAFP6encode_6forKeyySS_0P0QztKFTW + 14
12 libswiftCore.dylib 0x00007fff6c981234 $ss26_KeyedEncodingContainerBoxC6encode_6forKeyySS_0G0QztKF + 36
13 libswiftCore.dylib 0x00007fff6c97afa5 $ss22KeyedEncodingContainerV6encode_6forKeyySS_xtKF + 69
14 libDanger.dylib 0x0000000116c0801c $s6Danger9ViolationV6encode2toys7Encoder_p_tKF + 300
15
libDanger.dylib 0x0000000116c082a2 $s6Danger9ViolationVSEAASE6encode2toys7Encoder_p_tKFTW + 66
16 libswiftCore.dylib 0x00007fff6ca67367 $sSE6encode2toys7Encoder_p_tKFTj + 7
17 libswiftFoundation.dylib 0x00007fff6cc4bac2 $s10Foundation13__JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgSE_pKF + 4178
18 libswiftFoundation.dylib 0x00007fff6cc5ecef $s10Foundation29_JSONUnkeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLV6encodeyyxKSERzlF + 703
19 libswiftFoundation.dylib 0x00007fff6cc60049 $s10Foundation29_JSONUnkeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLVs07UnkeyedcD0AAsAEP6encodeyyqd__KSERd__lFTW + 9
20 libswiftCore.dylib 0x00007fff6c98a914 $sSasSERzlE6encode2toys7Encoder_p_tKF + 660
21 libswiftCore.dylib 0x00007fff6c98aa68 $sSayxGSEsSERzlSE6encode2toys7Encoder_p_tKFTW + 24
22 libswiftCore.dylib 0x00007fff6ca67367 $sSE6encode2toys7Encoder_p_tKFTj + 7
23 libswiftFoundation.dylib 0x00007fff6cc4bac2 $s10Foundation13__JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgSE_pKF + 4178
24 libswiftFoundation.dylib 0x00007fff6cc5890f $s10Foundation27_JSONKeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLV6encode_6forKeyyqd___xtKSERd__lF + 3791
25 libswiftFoundation.dylib 0x00007fff6cc5d095 $s10Foundation27_JSONKeyedEncodingContainer33_12768CA107A31EF2DCE034FD75B541C9LLVyxGs05KeyedcD8ProtocolAAsAFP6encode_6forKeyyqd___0P0QztKSERd__lFTW + 21
26 libswiftCore.dylib 0x00007fff6c9814a7 $ss26_KeyedEncodingContainerBoxC6encode_6forKeyyqd___0G0QztKSERd__lF + 39
27 libswiftCore.dylib 0x00007fff6c93f3ac $ss22KeyedEncodingContainerV6encode_6forKeyyqd___xtKSERd__lF + 76
28 libDanger.dylib 0x0000000116c09ee0 $s6Danger0A7ResultsV6encode2toys7Encoder_p_tKF + 704
29 libDanger.dylib 0x0000000116c0a523 $s6Danger0A7ResultsVSEAASE6encode2toys7Encoder_p_tKFTW + 83
30 libswiftCore.dylib 0x00007fff6ca67367 $sSE6encode2toys7Encoder_p_tKFTj + 7
31 libswiftFoundation.dylib 0x00007fff6cc4bac2 $s10Foundation13__JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgSE_pKF + 4178
32 libswiftFoundation.dylib 0x00007fff6cc4a628 $s10Foundation11JSONEncoderC6encodeyAA4DataVxKSERzlF + 456
33 libswiftFoundation.dylib 0x00007fff6cd3cede $s10Foundation11JSONEncoderC6encodeyAA4DataVxKSERzlFTj + 14
34 libDanger.dylib 0x0000000116bac867 $s6Danger17dumpResultsAtExit33_DA57A8538BDE0544FE0FD943A1DB0C2BLL_4pathyAA0A6RunnerC_SStF0B0L_yyF + 1303
35 libDanger.dylib 0x0000000116bad429 $s6Danger17dumpResultsAtExit33_DA57A8538BDE0544FE0FD943A1DB0C2BLL_4pathyAA0A6RunnerC_SStF0B0L_yyFTo + 9
36 libsystem_c.dylib 0x00007fff6d213143
__cxa_finalize_ranges + 326
37 libsystem_c.dylib 0x00007fff6d213412 exit + 55
38 libdyld.dylib 0x00007fff6d169cd0 start + 8
39 libdyld.dylib 0x000000000000001d start + 18446603338685965141
Launching Danger Swift runner (v3.4.1)
Got URL for JSON: /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/danger-dsl.json
Created a temporary file for the Dangerfile DSL at: /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/danger-dsl.json
Running Dangerfile at: scripts/swift/Danger/DangerFilePreChecks.swift
Preparing to compile
Running: /Users/ecerney/.swiftenv/shims/swiftc --driver-mode=swift -L /Users/ecerney/ios/project/.build/debug -I /Users/ecerney/ios/project/.build/debug -lDanger /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/_tmp_dangerfile.swift runner /snapshot/danger-js/distribution/commands/danger-pr.js --process .build/debug/danger-swift --passURLForDSL {GITHUB_PR_URL} --dangerfile scripts/swift/Danger/DangerFilePreChecks.swift --verbose --id PreChecks /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/danger-dsl.json /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/danger-response.json
Completed evaluation
ERROR: Dangerfile eval failed at scripts/swift/Danger/DangerFilePreChecks.swift
Saving and storing the results at /var/folders/fn/gwhkhbj526b_qlrl0sm8jhnxtnzk2_/T/danger-response.json
This issue does not happen if I change the toolchain back to Xcode 11.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 35 (15 by maintainers)
I’ve released danger-swift 3.5.0, please give it a try and tell me if it works.
No update from me other than I had to take a break trying to find a work around and just disabled danger for our Xcode 12 builds 😕. If I get more time this week I’ll continue to look into it but it seems like just a Swift bug
Interesting, will try it on Xcode 12 and see if I can get something useful