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

Ember-Data 2.14 compat #266

Closed
workmanw opened this issue May 30, 2017 · 4 comments
Closed

Ember-Data 2.14 compat #266

workmanw opened this issue May 30, 2017 · 4 comments
Assignees

Comments

@workmanw
Copy link
Contributor

It looks like Ember-Data has moved around some files that we import. Here is the error from my tests:

Could not find module `ember-data/-private/system/model/states` imported from `ember-data-model-fragments/states`
@workmanw workmanw self-assigned this May 30, 2017
@workmanw
Copy link
Contributor Author

Turns out there was an effort to consolidate ember-data's -private exports. See: emberjs/data#4925

As a result, one of the classes we need is completely isolated. I submitted a PR to try to remedy this: emberjs/data#5002


One additional hitch is that moving imports around kind of breaks backwards compatibility. We could use require(...) instead of import { ... } from '...' for the time being to support multiple paths. I'll explore that once the PR lands in beta. Input always welcome :)

@workmanw
Copy link
Contributor Author

workmanw commented Jun 9, 2017

@jakesjews et al -- Looking for opinions here. The import paths have changed and you cannot try/catch import failures. So if we want to keep backwards compatible, we'd have to use require() for the time being to import in 3 places so we can catch errors and import alternate paths.

Pros: Backwards Compat.
Cons: Hack. Incompatible w/ tree shaking efforts that are underway (which I have no idea about what the status is).

I'm inclined to just make a clean break here. I'd cut one last 2.11.x with the outstanding code on master. Then my PR would be 2.14.1. But I'm open to using require() for import for a period of time.

Thoughts?

@jakesjews
Copy link
Contributor

@workmanw I think a clean break is the right way forward too.

@workmanw
Copy link
Contributor Author

@jakesjews 👍 Just released 2.11.4 (the last in the 2.11.x series). Once ember-data ships 2.14, we'll ship ember-data-model-fragments 2.14.

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

No branches or pull requests

2 participants