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

Intent to RFC: Deprecate the Ember Global #541

Closed
pzuraq opened this issue Sep 5, 2019 · 2 comments
Closed

Intent to RFC: Deprecate the Ember Global #541

pzuraq opened this issue Sep 5, 2019 · 2 comments
Labels
Seeking Co-author T-deprecation T-framework RFCs that impact the ember.js library

Comments

@pzuraq
Copy link
Contributor

pzuraq commented Sep 5, 2019

  • Proposed Target: Ember v5.0.0
  • Alternative: ES Modules

The Ember Global (window.Ember) remains in the programming model, despite the fact that the globals resolver and much of its other functionality was deprecated a long time ago. This is primarily because, in part, removing the global means shifting around a lot of code within Ember itself. The other major part is that the global is the only way many intimate APIs, such as Ember.meta, are accessible.

With the global in place, its not possible for us to treeshake Ember in any meaningful way. It also forces a large eager evaluation cost on users of the framework, since every module gets evaluated immediately to construct the global. Removing the global will help with both of these, and will remove a fair amount of code from the application.

Migration Path

There are a number of intimate APIs that are currently only accessible on the global. Ideally, but the time the global is fully deprecated and removed, these APIs should all have alternatives, themselves be deprecated. The final version of this RFC should perform an audit of the remaining APIs that are only available on the Global, so we can begin this process.

Additionally, these APIs are used frequently by debug tooling, like the Ember Inspector. We must make sure that debug tooling has a way to get the information it needs to get before we remove these APIs. A public debug API will likely need to be created for this purpose.

Deprecation Timeline

This RFC is dependent on replacing all of the use cases for a number of intimate APIs with first class public APIs (or removing the need for them entirely). Until a thorough analysis is done, and the alternatives made, it will probably not be possible to finalize this RFC. Setting the proposed deadline at v5.0.0 gives us a target to try to achieve this by, which will help to motivate cleaning up the remaining intimate APIs.

@pzuraq pzuraq added T-deprecation T-framework RFCs that impact the ember.js library Seeking Co-author labels Oct 8, 2019
@pzuraq pzuraq changed the title Pre-RFC: Deprecate the Ember Global Intent to RFC: Deprecate the Ember Global Oct 8, 2019
@bertdeblock
Copy link
Member

Can we close this issue or does #706 not cover this completely?

@NullVoxPopuli
Copy link
Contributor

@locks I think we can close this, because the ember global is removed in v4

@wagenet wagenet closed this as completed Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seeking Co-author T-deprecation T-framework RFCs that impact the ember.js library
Projects
None yet
Development

No branches or pull requests

4 participants