Opened 17 months ago
Rebuild on a definition-based granularity
|Reported by:||EyalLotem||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
Currently, GHC rebuilds modules whose mtime suggests they changed, and all dependent modules.
This rebuilds *far* more than is actually necessary due to the change.
For example, if a single definition changed in a module, only that definition needs to be rebuilt, and very few of the definitions in the dependent modules probably depend on it, so only they ought to be rebuilt.
Another example, is temporarily checking out a different branch, and then going back to the master branch. In this case, the mtimes of many modules will change, but the content will remain the same.
If definition-granularity changes were detected, rather than module-granularity, this scenario will rebuild nothing.
This improvement could shorten the development cycle of all Haskell projects significantly, making Haskell a significantly more productive language to use on larger projects.