Sourcery: Sporadic Failures: exit code 132

The project I’m working on uses Sourcery for two of its targets, which build frameworks that are then linked into the main app.

Our team has been noticing that Sourcery frequently fails during compilation. Simply re-compiling immediately after getting the error resolves the issue. However, it happens often enough to cause friction. It occurs on multiple machines and on CircleCI for our CI builds, so it’s not isolated to my environment.

Any ideas what the issue might be or how to help debug this? It’s hard to find a pattern, but it seems more frequent after switching git branches.

Thanks!

Setup

  • Xcode 8.3.3
  • Using Sourcery 0.8.0 installed via CocoaPods.
  • Run Script:
    "$PODS_ROOT/Sourcery/bin/sourcery" \
      --sources "${PROJECT_DIR}/../Project/NGCore/" \
      --templates "${PROJECT_DIR}/../Project/Templates/" \
      --output "${PROJECT_DIR}/../Project/NGCore/Sources/CodeGeneration/" \
      --disableCache
    

The Error

The number after “line 6” (i.e. 15042) always changes.

~/Project/../Pods/Sourcery/bin/sourcery: line 6: 15042 Illegal instruction: 4  "${parent_path}"/Sourcery.app/Contents/MacOS/Sourcery "$@"
Command /bin/sh failed with exit code 132

Here are a few more examples:

fail1
fail2

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Might help. In my case during migration I had to restart mac OS just to make Xcode build the project after versions switch.

@Liquidsoul this might be related to #432