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

[CLEANUP] removed Ember.required #15892

Merged
merged 1 commit into from
Dec 28, 2017
Merged

Conversation

bekzod
Copy link
Contributor

@bekzod bekzod commented Nov 30, 2017

No description provided.

@bekzod bekzod mentioned this pull request Nov 30, 2017
34 tasks
@rwjblue
Copy link
Member

rwjblue commented Dec 1, 2017

I'm not 100% certain that this can be implemented in the addon. I believe we may need to go with the conditional flagging on this one.

@thoov - What do you think?

@thoov
Copy link
Member

thoov commented Dec 1, 2017

Agreed. Its going to have to be flagged. @bekzod I would look here for some examples: #15900

@rwjblue
Copy link
Member

rwjblue commented Dec 7, 2017

@bekzod - ping (when you have a chance)

@bekzod
Copy link
Contributor Author

bekzod commented Dec 7, 2017

@rwjblue so it should be runtime flag ? flags are not stripped in build time ?

@rwjblue
Copy link
Member

rwjblue commented Dec 7, 2017

Confirm. It has to be a runtime flag because we cannot polyfill it from the ember-2-legacy addon.

@bekzod bekzod force-pushed the remove-required branch 3 times, most recently from 03605e0 to c0df986 Compare December 26, 2017 19:32
@bekzod
Copy link
Contributor Author

bekzod commented Dec 26, 2017

does this look better ?

QUnit.module('Module.required', {
setup() {
originalEnvVal = ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a ; here

@@ -127,7 +127,6 @@ Ember.observersFor = metal.observersFor;
Ember.removeObserver = metal.removeObserver;
Ember._suspendObserver = metal._suspendObserver;
Ember._suspendObservers = metal._suspendObservers;
Ember.required = metal.required;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are going to have to guard this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -108,7 +108,6 @@ QUnit.module('ember reexports');
['removeObserver', 'ember-metal'],
['_suspendObserver', 'ember-metal'],
['_suspendObservers', 'ember-metal'],
['required', 'ember-metal'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are going to have to guard this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@thoov
Copy link
Member

thoov commented Dec 28, 2017

LGTM @rwjblue can you take a look

@rwjblue rwjblue merged commit 213d436 into emberjs:master Dec 28, 2017
@krisselden
Copy link
Contributor

In practice, this required doesn't do anything because of applyPartial and finishPartial doesn't handle it. It only affects mixin.apply() which is rare. For upgrading an addon could just make required() present and return null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants