-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Add RFC for deprecation Ember Data initializers #181
Conversation
230e0e4
to
919279f
Compare
`transforms`, and `store` Ember initializers that Ember Data injects | ||
into apps. The `ember-data` initializer not be changed and any code | ||
that previously depended on the ordering of these initializers (via | ||
the `before` or `after` properties on an initalizer) will can be |
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.
"will can be changed"
# Summary | ||
|
||
The goal of this RFC is to remove the `data-adapter`, `injectStore`, | ||
`transforms`, and `store` Ember initializers that Ember Data injects |
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.
possibly better to refer to them as application/application instance initializers?
|
||
# Motivation | ||
|
||
The intializes `data-adapter`, `injectStore`, `transforms`, and |
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.
initializers
`store` have not been used by Ember Data since | ||
[Apr 8, 2014](https://github.com/emberjs/data/commit/d25e23f622a3677b8372db535b2ab824ad306a16). However, | ||
they are still injected into every Ember app that depends on Ember | ||
Data because existing apps may have depending on these initializers |
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.
"may have depending"
Data needs to support. | ||
|
||
Since these initializers are noop functions that run after the | ||
`ember-data` initializer. Any initializers that depends on one of the |
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.
comma instead of period?
# Detailed design | ||
|
||
Ember Data's instance initializer will start checking for any | ||
initializers who's `before` or `after` properties depend on one of |
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.
whose
Ember Data's instance initializer will start checking for any | ||
initializers who's `before` or `after` properties depend on one of | ||
these deprecated initalizer. If it finds an initalizer that references | ||
one of the deprecated initalizers Ember Data will then log a |
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.
initializers,
# How We Teach This | ||
|
||
This change should have no impact on how we teach Ember or Ember | ||
Data. The initalizers that will be remove have been unused for a long |
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.
"will be remove"
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.
Muphry's law kicking in here ... "removed"
removed. | ||
|
||
|
||
# How We Teach This |
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.
could we come up with a codemod?
|
||
Users who need to run initalizer code before or after Ember Data | ||
injects the store into routes should be taught to use `before: | ||
'ember-data'`, or `after: 'ember-data'` on there initalizers. |
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.
their
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.
initializers
@bmac as done in https://github.com/cibernox/rfcs/blob/deprecate-ember-k/text/0000-deprecate-ember-k.md#addenda, I would like to suggestion reaching out to EmberObserver and get some usage statistics across published addons (worried about outdated dependencies), and coming up with a codemod, if possible. Looking good! |
@locks I checked out all of the Ember Data Adapters and Ember Data Extensions form Ember observer and found the following adapters referencing the deprecated initializers.
|
|
||
The goal of this RFC is to remove the `data-adapter`, `injectStore`, | ||
`transforms`, and `store` Ember application initializers that Ember Data injects | ||
into apps. The `ember-data` initializer not be changed and any code |
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.
"will not be changed"
The Ember Data team has reviewed this proposal and have decided to move it to the Final Comment Period! If no new significant concerns are raised, in one week's time this proposal will be officially merged. |
Rendered.
Known usage (checked for PR sent)
Todo