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

[DEPRECATE] registerPlugin / unregisterPlugin and legacy class based AST plugins #19429

Merged
merged 1 commit into from Feb 25, 2021

Commits on Feb 25, 2021

  1. [DEPRECATE] registerPlugin / unregisterPlugin and legacy class ba…

    …sed AST plugins
    
    The usage of `registerPlugin`/`unregisterPlugin` **requires** global
    state mutation which leaks AST plugins between addon's and applications.
    Tools like Embroider and ember-cli-htmlbars have avoided this by
    ensuring that we purge the Node module caching system between each
    attempt at using the template compiler. This results in _massive_ memory
    growth (the entire `ember-template-compiler.js` source string is
    included in memory for each addon in the build, as well as any JIT
    artificats).
    
    This is **very _bad_**.
    
    This PR deprecates using `registerPlugin`/`unregisterPlugin` along with
    the legacy AST transform API. All of these APIs are private APIs (as is
    anything to do with the template compilation AST), but they are used
    fairly often so a proper deprecation cycle is useful.
    rwjblue committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    1b0e21a View commit details
    Browse the repository at this point in the history