Xcode recompiles app when previous build succeeds

Originator:keithbsmiley
Number:rdar://31522865 Date Originated:09-Apr-2017 02:44
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.3.1 (8E1000a)
Classification:Other Bug Reproducible:Sometimes
 
Summary:
Using the undocumented `ExplainWhyBuildCommandsAreRun` Xcode setting, sometimes subsequent builds fail to build incrementally and instead recompile all swift sources. In this case the first build succeeded and the second re-ran `swiftc` because:

```
(running because the command failed with exit code 2 the last time it ran)
```

Even though the last build succeeded.

Steps to Reproduce:
1. Compile a Swift app
2. Build it again

Expected Results:
The second build is a no-op because it incrementally builds the Swift

Actual Results:
Sometimes it recompiles the entire app

Version:
Version 8.3.1 (8E1000a)

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!