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

Deprecate store:application and store:main in favor of service:store #3286

Merged
merged 1 commit into from
Jun 13, 2015

Conversation

bmac
Copy link
Member

@bmac bmac commented Jun 10, 2015

Right now Ember Data supports 3 namespaces where you can define the store store:main, store:application and service:store. I want to reduce this to 1 place for Ember Data 2.0 because it simplifies our initializer code and if a user were to define a custom store for more then 1 of those namespaces it can result in multiple stores instances in their app which is confusing to debug.

I'd like to recommend defining a custom store as service:store (app/services/store.js) as the path going forward. Is this a good idea/bad idea?

I would also like to see this pr become a beta-19.2 patch release to help people upgrading who currently have a custom store defined in app/store.js. Let me know what you think about this change?

@bmac bmac force-pushed the fix-store-main branch from 5e5e382 to effb23e Compare June 10, 2015 14:32
@igorT
Copy link
Member

igorT commented Jun 11, 2015

Can we add a test for the duplicate store bug, or is it too hard?

@bmac bmac mentioned this pull request Jun 11, 2015
10 tasks
@bmac bmac force-pushed the fix-store-main branch from effb23e to ac93315 Compare June 13, 2015 13:40
@bmac bmac changed the title Add backwards compatibility for customs store's defined in app/store.js. Deprecate store:application and store:main in favor of service:store Jun 13, 2015
@bmac
Copy link
Member Author

bmac commented Jun 13, 2015

@igorT I have updated this pr to add deprecation warnings.

use service:store`app/services/store.js` to prevent duplicate stores.
@bmac bmac force-pushed the fix-store-main branch from ac93315 to aaa16d2 Compare June 13, 2015 13:43
@igorT
Copy link
Member

igorT commented Jun 13, 2015

👍 merge whenever travis likes it

bmac added a commit that referenced this pull request Jun 13, 2015
Deprecate `store:application` and `store:main` in favor of `service:store`
@bmac bmac merged commit d913d2f into emberjs:master Jun 13, 2015
@bmac bmac deleted the fix-store-main branch June 13, 2015 15:13
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