Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-cli): prevent prior compilations from being retained in watch builds #42537

Closed

Commits on Jun 9, 2021

  1. fix(compiler-cli): prevent prior compilations from being retained in …

    …watch builds
    
    In watch builds, the compiler attempts to reuse as much information from
    a prior compilation as possible. To accomplish this, it keeps a
    reference to the most recently succeeded `TraitCompiler`, which contains
    all analysis data for the program. However, `TraitCompiler` has an
    internal reference to an `IncrementalBuild`, which is itself built on
    top of its prior state. Consequently, all prior compilations continued
    to be referenced, preventing garbage collection from cleaning up these
    instances.
    
    This commit changes the `AnalyzedIncrementalState` to no longer retain
    a `TraitCompiler` instance, but only the analysis data it contains. This
    breaks the retainer path to the prior incremental state, allowing it to
    be garbage collected.
    JoostK committed Jun 9, 2021
    Copy the full SHA
    22c44cd View commit details
    Browse the repository at this point in the history