Open scottandrew opened 4 years ago
What happens if you run swift run danger-swift local
?
This works locally. Are you asking about doing that on Travis?
Ok, can I see your travis config please?
I can't give you the whole config but the relevant parts are:
os: osx
language: swift
osx_image: xcode11.3
cache:
~/.danger-swift
.build
branches:
only:
- /^release.*$/
- master
- /^ORDER-.*$/
- /^.*\/?ORDER-.*$/
- /^.*\/?SERVICES-.*$/
# Build stages: https://docs.travis-ci.com/user/build-stages/.
stages:
- compile
- debug
- release
jobs:
include:
# compile: Check that the code builds and tests pass.
- stage: compile
before_install:
# make sure our shell scripts are executable.
- chmod +x ./scripts/before_install.sh
- chmod +x ./scripts/prepare_keychain.sh
- chmod +x ./scripts/after_script.sh
# make suree cocoa pods is up to date.
- sudo gem install cocoapods
- sudo gem install xcpretty-json-formatter
# last minute preperations before we install.
- ./scripts/before_install.sh
# update pods.
- travis_wait pod install --repo-update
before_script:
# prepare keychain for signing.
- ./scripts/prepare_keychain.sh
script:
# clean, build and test
- xcodebuild -workspace Kiosk-Fresh.xcworkspace -scheme Kiosk -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPad (7th generation),OS=13.2.2' clean test | XCPRETTY_JSON_FILE_OUTPUT=result.json xcpretty -f `xcpretty-json-formatter`
- swift run danger-swift ci --failOnErrors
The before install script has:
#Required to fix: RuntimeError: [!] Please enable Spotlight indexing for /Applications.
sudo mdutil -i on /
# Install ImageMagik so we can badge the icon.
brew install imagemagick graphicsmagick
brew install xctool
npm install -g danger
swift build
full stack dump is:
[38/39] Merging module Runner
1884[39/39] Linking danger-swift
1885Stack dump:
18860. Program arguments: /Applications/Xcode-11.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/_tmp_dangerfile.swift -enable-objc-interop -sdk /Applications/Xcode-11.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/travis/build/Keenwawa/Kiosk/.build/debug -module-name _tmp_dangerfile -lDanger -- /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/danger-dsl.json /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/danger-response.json
1887
18880 swift 0x0000000106c5aa63
1889PrintStackTraceSignalHandler(void*) + 51
18901 swift 0x0000000106c5a236 SignalHandler(int) + 358
18912 libsystem_platform.dylib 0x00007fff59563b5d _sigtramp + 29
18923 libsystem_platform.dylib 000000000000000000 _sigtramp + 2796143808
18934 swift 0x00000001028cdcfd llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) + 365
18945 swift 0x00000001028d4cb2 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, 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&, char const* const*) + 1090
1895
18966 swift 0x00000001028a7d5f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 45727
18977 swift 0x00000001028992b4 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
1898
18998 swift 0x00000001028267b3 main + 1219
19009 libdyld.dylib 0x00007fff5937e3d5 start + 1
190110 libdyld.dylib 0x000000000000000f start + 2798132283
1902
1903ERROR: Dangerfile eval failed at Dangerfile.swift
1904ERROR: Could not get the results JSON file at /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/danger-response.json
I didn't find an answer to why is not working, I have a really similar configuration on this repo https://github.com/f-meloni/danger-swift-coverage and is working, maybe that could help you to find the reason why is crashing
I have no clue what is going on.. I have to give up on this for a bit..
I am trying to integrate danger 3.0 into our repo using package manger.
My package looks like so:
I am using the installing and verifying using the steps described:
Danger file is:
But when I run danger I am getting the following stack dump on travis.