-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
pzuraq
approved these changes
Feb 25, 2021
ember-cli/ember-cli-htmlbars#661 should resolve the deprecation for ember-cli-htmlbars. |
For folks seeing the See https://github.com/ember-cli/ember-cli-htmlbars/releases/tag/v5.6.0 for more details. |
This was referenced Mar 4, 2021
https://github.com/DockYard/ember-maybe-in-element also has this issue |
k-fish
referenced
this pull request
in getsentry/sentry-javascript
Oct 4, 2021
As noted in #4015, a registerPlugin deprecation is now caused by @sentry/ember because of the Ember version upgrade. As mentioned here, https://github.com/emberjs/ember.js/pull/19429\#issuecomment-786403885 updating htmlbars should fix this.
AbhiPrasad
referenced
this pull request
in getsentry/sentry-javascript
Oct 4, 2021
As noted in #4015, a registerPlugin deprecation is now caused by @sentry/ember because of the Ember version upgrade. As mentioned here, https://github.com/emberjs/ember.js/pull/19429\#issuecomment-786403885 updating htmlbars should fix this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 entireember-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.Related: