添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

This specific error points to a bug in the Swift compiler. I have it happening on my app, with a handful of files, but intermittently. My build server has the same code checked out 5 times, with three checkouts building and the other two failing. I suspect once the file builds successfully and gets cached in Derived Data, the problem will go away until it is recompiled.

What you can do to identify the error is:

  1. Click on "Command SwiftCompile failed with nonzero exit code" in the Issues navigator. This will open the build log, selecting the error.
  2. Look at the file above it the error, in my case "Compiling ExtractedEvent.swift", which has a error indicator to the right and a grey exclamation point to the left.
  3. Click on the four line hamburger icon on the far right side to open the output.

You should see something like:

SwiftCompile normal x86_64 Compiling\ ExtractedEvent.swift /path/to/file
  cd ...
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:

This means the compiler is broken and you should file the bug as directed.

What's working for me for now is to just keep hitting build until the error goes away.

This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Developer Forums Participation Agreement and Apple provided code is subject to the Apple Sample Code License.
  • Forums
  • Terms of Use Privacy Policy License Agreements