Opened 2 years ago

#8610 new feature request

Rebuild on a definition-based granularity

Reported by: EyalLotem Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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.

Change History (0)

Note: See TracTickets for help on using tickets.