-
-
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
[BUGFIX canary] Deprecate passing function as test argument to deprecate/warn/assert #12370
Conversation
All tests pass. (sauce test suite pass sometimes, sometimes it needs to re-run... it is really misleading) Also, it seems to me that |
@rwjblue should I rebase or you aren't interested in this pr? |
i would be in favor, but will defer to @rwjblue |
@rwjblue any feedback on this? |
@kuzirashi Sorry for no feedback. I'm definitely 👍 on this. |
@@ -87,7 +87,7 @@ export let missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you | |||
@param {String} message A description of the deprecation. | |||
@param {Boolean|Function} test A boolean. If falsy, the deprecation | |||
will be displayed. If this is a function, it will be executed and its return |
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.
Lets just remove the reference to using a function all together.
@kuzirashi - This looks very good. I have left a few pretty minor comments. When you have time can you fixup the comments, squash, and rebase? |
I'll find the time. I'll mention you when it's all ready. Thanks for review. ;) |
I agree with @mmun though, this deprecation should probably not be tldr; can you update to use |
Sure it'll be changed to |
Rebased, squashed, tests pass. Except tests on sauce which randomly pass or fail from my experience. @rwjblue |
Awesome, thanks for your hard work on this @kuzirashi! |
[BUGFIX canary] Deprecate passing function as test argument to deprecate/warn/assert
@kuzirashi - Would you mind submitting a PR to https://github.com/emberjs/website/blob/master/source/deprecations/v2.x.html.md adding a section on this for 2.2? |
Sure :) |
PR in website repo created. @rwjblue |
This PR attempts to deprecate using function as test argument in:
Ember.deprecate
,Ember.warn
andEmber.assert
. It's first part of closing issue #11898. Tests forember-debug
pass, but I still have to fix other tests and code, which trigger deprecation with function as test argument. Seems like this behavior is used in many places in application lifecycle. It's my first attempt to commit actual code to Ember.js so I appreciate any help.@mmun, @rwjblue