-
-
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
[FIXES #14405] deprecation of enumerable events: #14710
Conversation
* addEnumerableObserver * removeEnumerableObserver * hasEnumerableObserver
deprecate( | ||
'Usage of `Enumerable.prototype.addEnumerableObserver` is deprecated.', | ||
false, | ||
{ until: '2.12.0', id: 'ember-metal.enumerable.addEnumerableObserver' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mixonic / @chancancode what is the appropriate until
value here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can never remember; does 2.12 mean 2.12 is the last version where this continues to work? I'll have to update my patch accordingly.
@rwjblue may want to chat with you about this one sometime this week. Maybe tue or wed? |
Is this also deprecating the hasArrayObserver property, or do we need to track that separately? |
@chancancode oops, i can add that. |
@stefanpenner not sure if it applies here, but in the past we have done something like this: export actuallyDoFoo(instance, args) {
// ... no deprecation... use this for internal uses
}
export default SomeClass.extends({
doFoo(args) {
deprecate(...);
return actuallyDoFoo(this, args);
}
}); |
@chancancode ya, that partially works. We will need to adapt some more as Basically we may need to add another level of indirection to correctly deprecate only users use of this, but not our own internal use of it. export actuallyDoFoo(instance, args) {
// ... no deprecation... use this for internal uses
}
export default SomeClass.extends({
doFoo(args) {
deprecate(...);
if (this.actuallyDoFoo) { // deprecate } else { actuallyDoFoo(this, args); }
}
}); |
where are these used internally that would cause spew? |
Enumerable events were removed in #16116. |
deprecate:
Remaining tasks:
come up with an implementation to deprecate without causing lots of spew.
this is tricky, because we both depend on this method, and invoke it internally (as sometimes our way of enabling the public API)
deprecate all pieces
make tests green
???
Questions:
until
when?enumerable:change