In Unity, assembly can be used to accelerate compiling.
I used to believe that if one script changed, only its containing assembly is recompiled.
I did some experiments today, and find that not only the containing assembly is recompiled.
For example, Assembly-CSharp.dll is recompiled most of the time.
Assume script 'a' belongs to assembly 'A'.
Based on my experiments, adding/deleting public field or method, assemblies that reference 'A' will be recompiled. Modifying content of a public method will not cause referencing assemblies to be recompiled. adding/deleting/modifying private things will not cause referencing assemblies to be recompiled either.
So, which assemblies will be recompiled if I change one script in Unity?
Is there any article or book about this?
It's all about dependencies. Unity makes use of c# which uses CSharpCompiler (here), you can look up MSDN directly to get in depth understanding on the build/compilation process.
There are lots on intricacies but I will try to explain the basic cases consider you have 2 assemblies A and B
So this problem can get complicated very soon say if you have 5 assemblies, if compilation time is really important for you, it's a good idea to think about structuring the code which is a big topic altogether