Skip to content

[BUGFIX beta] Raise by default when ENV.RAISE_ON_DEPRECATION is true#11432

Merged
rwjblue merged 1 commit intoemberjs:masterfrom
bantic:fix-raise-on-deprecation
Jun 12, 2015
Merged

[BUGFIX beta] Raise by default when ENV.RAISE_ON_DEPRECATION is true#11432
rwjblue merged 1 commit intoemberjs:masterfrom
bantic:fix-raise-on-deprecation

Conversation

@bantic
Copy link
Member

@bantic bantic commented Jun 12, 2015

Fixes an issue introduced by #11419 where the evaluation of
ENV.RAISE_ON_DEPRECATION was moved to boot-time rather than run-time.

Previously, it was possible to set RAISE_ON_DEPRECATION to true midway
through running an app, and all deprecations after that would throw
because Ember.deprecate would check the value of the env variable
every time it was called.

The code in #11419 changed to a one-time evaulation at boot-time,
breaking that original behavior. This commit restores the old behavior
while still allowing changing deprecation behavior for specific
deprecations by id.

@rwjblue
Copy link
Member

rwjblue commented Jun 12, 2015

👍

@rwjblue
Copy link
Member

rwjblue commented Jun 12, 2015

Thank you for the tests

@bantic
Copy link
Member Author

bantic commented Jun 12, 2015

I clearly didn't run w/ JSCS. Sorry, will fix the tests now.

Fixes an issue introduced by emberjs#11419 where the evaluation of
`ENV.RAISE_ON_DEPRECATION` was moved to boot-time rather than run-time.

Previously, it was possible to set `RAISE_ON_DEPRECATION` to true midway
through running an app, and all deprecations after that would throw
because `Ember.deprecate` would check the value of the env variable
every time it was called.

The code in emberjs#11419 changed to a [one-time evaulation at boot-time](https://github.com/emberjs/ember.js/blob/master/packages/ember-debug/lib/main.js#L279-L281),
breaking that original behavior. This commit restores the old behavior
while still allowing changing deprecation behavior for specific
deprecations by id.
@bantic bantic force-pushed the fix-raise-on-deprecation branch from 9e81055 to 7290c71 Compare June 12, 2015 21:47
rwjblue added a commit that referenced this pull request Jun 12, 2015
[BUGFIX beta] Raise by default when `ENV.RAISE_ON_DEPRECATION` is true
@rwjblue rwjblue merged commit f6d5b42 into emberjs:master Jun 12, 2015
@bantic bantic deleted the fix-raise-on-deprecation branch June 12, 2015 22:02
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