-
-
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
New options for deprecate() function #19133
Conversation
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.
Thanks for working on this @mehulkar!
We should:
- Add some deprecation flagging around the new deprecations (see
8b7d402
(#18436) as an example) - Update all existing callsites of
deprecate
to pass the new options (Ember itself should not trigger this deprecation) - Address the inline comments
@rwjblue bit confused about what to do here. Is the "deprecated feature" here the ability to call |
@@ -64,6 +64,10 @@ if (DEBUG) { | |||
deprecate(message, false, { | |||
id: 'autotracking.mutation-after-consumption', | |||
until: '4.0.0', | |||
for: 'ember-source', | |||
since: { | |||
enabled: '3.21.0', |
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.
export interface DeprecationOptions { | ||
id: string; | ||
until: string; | ||
url?: string; | ||
for: string; | ||
since: Partial<Record<DeprecationStages, string>>; |
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.
Thanks for the assist @dfreeman!
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.
Thanks for working on this @mehulkar!
@mehulkar - Mind squashing this down? Once that is done, we can land... |
This implements the first stage of the Deprecation Staging RFC emberjs/rfcs#649 This commit also: - deprecates the usage of deprecate() function without passing these options - Updates all the usages of deprecate() in the repo to pass these options.
Squashed and pushed! |
Thanks again! |
Since emberjs/ember.js#19133, ember-source requires passing a `since` option to the `deprecate` function. Since this deprecation is targeted for removal in 8.0 anyway, seems like we can just remove it instead of fixing the issue.
This implements the
for
andsince
options for thedeprecate()
function as detailed in github.com/emberjs/rfcs/pull/649 Not sure if it's the right place to start, but seemed like the lowest hanging fruit.cc @rwjblue @pzuraq