-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
legacy-register initializer is incorrectly added to Ember 2.0.1 addon #100
Comments
I should point out that, for the record, I am seeing this problem both in an ember-cli application running Ember 2.0.1 and an ember-cli addon running Ember 2.0.1. It was easier to create the minimal reproduction case based on the addon, so I did that. If there's anything else I can do that would be helpful (or if there are any pointers that would help in debugging this), please let me know. I've already spent a lot of time digging around inside the broccoli trees, and I don't mind spending more if it will help get the problem solved. Thanks! |
It appears Taking a look.. |
A quick fix would be for this check to be inverted, rather make the legacy the opt in, rather then opt out. The root issue appears to be multiple paths to initializing addons due to how the legacy registry worked... |
I am fine at this point dropping legacy support and versioning accordingly. Thoughts Stefan? |
👍 |
Versioned as 4.0.0 and also will resolve this issue. |
I'm trying to use
ember-moment
as dependency of theember-cp-validations
addon. For some reason, the legacy-register initializer is getting included in the built application, even though the app is using Ember 2.0.1. I've created an extremely minimal ember addon where you can see the error in action—it's basically just an empty ember addon plus ember-moment. To see the problem, do this:Then open http://localhost:4200 in your browser, and check the console to see the initializer throwing an exception by trying to use an API that has been removed in Ember 2.
I spent a bunch of time trying to debug this, and as far as I can tell, the ember-moment
index.js
file is correctly able to tell that the app is using Ember 2, and thetreeForApp
does not actually include the initializer. In spite of that, however, the tree for the final dummy application for this addon does somehow include it. My extremely hacky solution to this problem was to add this to myember-cli-build.js
:Any help figuring out how this initializer is ending up in the build tree, and how to stop that from happening, would be great. :)
The text was updated successfully, but these errors were encountered: