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

[FEATURE ember-debug-handlers] #11833

Merged
merged 1 commit into from
Jul 21, 2015
Merged

[FEATURE ember-debug-handlers] #11833

merged 1 commit into from
Jul 21, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jul 21, 2015

Implement emberjs/rfcs#65.

/cc @mixonic

@rwjblue
Copy link
Member Author

rwjblue commented Jul 21, 2015

FYI - #11835 is a meta issue created to add id and until as needed, per the RFC.

});

registerHandler(function raiseOnDeprecation(message, options, next) {
let updatedMessage = formatMessage(message);
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 this would format the message twice. Once here and (if raise on deprecation is false) once in logDeprecationToConsole. Seems like this let should be inside the if.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will move into the if (that makes sense), but it will not double format because we are calling next(...arguments) and not this local variable.

@rwjblue
Copy link
Member Author

rwjblue commented Jul 21, 2015

Updated with @mixonic's feedback.

mixonic added a commit that referenced this pull request Jul 21, 2015
[FEATURE ember-debug-handlers]
@mixonic mixonic merged commit 574ee7e into emberjs:master Jul 21, 2015
@mixonic mixonic deleted the rfc-65 branch July 21, 2015 14:55
@@ -0,0 +1,27 @@
import isPlainFunction from 'ember-debug/is-plain-function';

export let HANDLERS = { };
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you need to evict these somehow in tests, otherwise you will retain deprecations across app and isolated container instances.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what you mean, these are global and are not changed per application or container.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah never mind I thought for a second this was going to hold a map of arrays. This is clearly not the case https://github.com/emberjs/ember.js/pull/11833/files#diff-889b83df6e6038c39617a4a40aec777fR12.

twokul added a commit to Addepar/ember-table that referenced this pull request Feb 5, 2021
[ember-debug-handlers-polyfill](https://github.com/ember-polyfills/ember-debug-handlers-polyfill)
provides an implementation of
[emberjs/rfcs#65](https://github.com/emberjs/rfcs/blob/master/text/0065-deprecation-warning-handlers.md)
(added to Ember in
[emberjs/ember.js#11833](emberjs/ember.js#11833)
and released in Ember v2.1.0) that can be used with versions of Ember
prior to v2.1.0.
twokul added a commit to Addepar/ember-table that referenced this pull request Feb 5, 2021
[ember-debug-handlers-polyfill](https://github.com/ember-polyfills/ember-debug-handlers-polyfill)
provides an implementation of
[emberjs/rfcs#65](https://github.com/emberjs/rfcs/blob/master/text/0065-deprecation-warning-handlers.md)
(added to Ember in
[emberjs/ember.js#11833](emberjs/ember.js#11833)
and released in Ember v2.1.0) that can be used with versions of Ember
prior to v2.1.0.
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.

3 participants