I know that the Swift incremental compilation is not perfect and mostly conservative in determining what it needs to do. E.g. sometimes it recompile more files than required and also sometime loads more definitions than required from ObjC or swift modules. What I find unusual is, no documentation around what developers can do to help compiler to have most accurate approximation. Apart from doing obvious things like making declarations private/fileprivate what we can do
- one class/struct/enum per file?
- minimal possible ObjcC<->Swift interface?
- diagnosis using
-debug-time-function-bodiesand fixing expressions, method bodies (mostly by rewriting expressions and providing type information explicitly)
e.g. code samples, like why sometime compiler become too conservative to marks file dirty
Is there a documentation around this that I can refer to?