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

initializer broken: "ember-application-instance-initializers" feature flag not honored? #10744

Closed
IanVS opened this issue Mar 28, 2015 · 4 comments

Comments

@IanVS
Copy link

IanVS commented Mar 28, 2015

It seems that the feature flag is not correctly handling the changes in #10179.

I came to this conclusion after discovering the addon ember-slide-show is broken with 1.11.0-beta.5 due to the initializer not working correctly. It uses the (now deprecated) format:

export default function (container, application) {
  container.lookup = function (fullName, options) {

If I inspect the container, I find it is actually a registry, not a container. The initializer then doesn't work as it's supposed to, and the app crashes.

Perhaps this change should be wrapped by the feature flag? https://github.com/emberjs/ember.js/pull/10179/files#diff-72046545a81f2bbfa349461bbcf59035L698

I tried to fork ember.js and make the change to see if it would work, and maybe even submit a PR, but I can't for the life of me figure out how to use a local fork of ember in an app. npm link usually makes it so easy, but I'm lost with bower, and there seems to be no good guide that I can find. Is there one somewhere that I'm missing?

Using:

  • ember-cli: 0.2.1
  • ember: 1.11.0-beta.5
  • ember data: 1.0.0-beta.16

Edit: this breaks in 1.11.0-beta.1 as well, but works fine in 1.10.0

@IanVS
Copy link
Author

IanVS commented Mar 28, 2015

Wait, maybe this has more to do with other recent changes (specifically #10256). But I don't see any deprecation warnings, the app just breaks...

@IanVS IanVS changed the title initializer broken: ember-application-initializer-context feature flag not honored? initializer broken: "ember-application-instance-initializers" feature flag not honored? Mar 28, 2015
@stefanpenner
Copy link
Member

@IanVS https://gist.github.com/rwjblue/9216101d3d15a9134bdd might be of help to you

@rwjblue
Copy link
Member

rwjblue commented Mar 28, 2015

That addon is actually overriding container.lookup with its own custom function (here). That is generally not a good idea....

The fact that it is not working with 1.11.0-beta.5 is due to a large refactor of the (completely private) container lookup system. That addon will need to accommodate these changes.

I do not believe that this is an Ember bug, but if you can reproduce without overriding private internal methods (you can use this JSBin as a baseline) we will absolutely get it fixed.

@rwjblue rwjblue closed this as completed Mar 28, 2015
@IanVS
Copy link
Author

IanVS commented Mar 29, 2015

@rwjblue OK thanks. I'm no expert so I figured I'd report just in case it was indeed a bug. Appreciate you taking a look.

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

3 participants