Optimizing incremental compilation status tracker

This issue is created as a status tracker to implement an optimization for incremental compilations to enable more effective reuse of work from the previous compilation. The general idea is that decorated classes will be compared to their equivalent in the prior compilation and skip emit if nothing relevant has changed. There has been a working prototype in #39791 which implements this idea, which has since been refined to a simplified yet more effective approach.

This work aims to address #34867 and #40635. One initial improvement in response to #40635 is pending in angular/angular-cli#19986 which avoids an inefficiency in Webpack’s dependency mechanism resulting in a significant improvement of rebuild times. This work should take this one step further and avoid emit of files when their generated output could not possibly be affected by the change.

  • Implement semantic dependency graph and symbol comparison (ngtsc/semantic-updates)
  • Refactor the registration of semantic symbols
  • Work on remote scoping scenarios
  • Address scenarios that may result in broken type-check-blocks
    • Generic type parameters
    • Changes to inheritance chains
    • Changes to type-checking metadata
  • Test various scenarios:
    • Update expectations for existing tests.
    • Test behavior in combination with errors in the program.
    • Test behavior in combination with external declarations.
    • Changing an NgModule into a Component, and all other relevant combinations.
    • Introducing and breaking cyclic component includes to verify remote scoping.
    • Classes that are exported under a different name
    • Add template type-checking tests for generic type parameters
    • Add template type-checking tests for inline ctors
    • Add template type-checking tests for various metadata properties
    • Add template type-checking tests for inheritance
  • Update ngcc tests (i.e. fix build errors)
  • Update incremental rebuild documentation.
  • Review

1 possible answer(s) on “Optimizing incremental compilation status tracker