typealiased / mockingbird

A Swifty mocking framework for Swift and Objective-C.
https://mockingbirdswift.com
MIT License
657 stars 82 forks source link

MockingBird crashing in build phase #192

Closed Marcin951 closed 3 years ago

Marcin951 commented 3 years ago

New Issue Checklist

Description

I can't build the project without the crash after install MockingBird

Generator Bugs

error message after crash on building project

Zrzut ekranu 2021-02-11 o 21 49 03

/Users/marcinkaczmarzyk/Library/Developer/Xcode/DerivedData/Hangable-fjncjlqekoqfrgdniczrzmekgrbv/Build/Intermediates.noindex/Hangable.build/Debug-iphonesimulator/HangableTests.build/Script-CD7B4D3D7240BAE4C304CE9C.sh: line 7: 68371 Illegal instruction: 4 mockingbird generate --targets 'Hangable' --outputs "${SRCROOT}/MockingbirdMocks/HangableTests-HangableMocks.generated.swift" --support "${SRCROOT}/MockingbirdSupport" Command PhaseScriptExecution failed with a nonzero exit code

Framework Bugs

It's crashing in build phase

Environment

That is how my Podfile looks

`platform :ios, '13.0'

target 'Hangable' do use_frameworks! inhibit_all_warnings!

Pods for Hangable

pod 'Firebase/Core'
........

end

target 'HangableTests' do inherit! :complete pod 'MockingbirdFramework' end

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end

`

andrewchang-bird commented 3 years ago

Thanks for the report! It’s likely due to a parser issue (we’re tracking a few right now). If you have a few min, running the generator locally running and pointing it to your project + Hangable source target should show the exact line(s) and file(s) that it’s breaking on, which you can then add to .mockingbird-ignore (and we can fix in the next release):

  1. Follow the environment setup steps: https://github.com/birdrides/mockingbird/wiki/Local-Development
  2. Select MockingbirdCli as the target
  3. Edit the scheme (cmd + shift + comma) and change the launch arguments to generate --project <your_project> --target Hangable --output /tmp/unused
  4. Run the CLI and screenshot / post the logs of where it crashes
  5. Add the file to .mockingbird-ignore
  6. Repeat from (4) until it doesn’t crash anymore