Swift Incremental Builds don't work

Originator:barbararodeker
Number:rdar://28848000 Date Originated:19-10-2016
Status:Closed as duplication of 19941735 Resolved:
Product:Swift Product Version:-
Classification: Reproducible:always
 
Summary:
After changing some point of a Swift class (adding a new variable, changing the name to a function or adding a class) the whole Swift project is recompiled.

This is causing a lot of wasted time.

We have reproduced the problem with a clean project, only with 2 classes written in Swift, without relation between them.

Incremental builds are working only if we change something INSIDE a function.
This forum thread is related https://forums.developer.apple.com/thread/62737

Steps to Reproduce:
1. Make a Swift project
2. Add 2 classes.
3. Add 2 vars to the classes.
4. Compile.
5. Change the name of one of the variables.
6. Compile

Expected Results:
The incremental builds should not recompile all the Swift classes that were not changed.

Actual Results:
All the classes are recompiled even if there were no changes

Version:
Version 8.0 (8A218a)

Notes:


Configuration:
Is happening on any machine.
Mine in particular has these configuration:
OS 10.11.6 (15G1004) - 2,8 GHz Intel Core i7 - 16 GB DDR3

--------
Update from September 1st: this is still happening with Xcode 9 and Swift 4

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!