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

Add ember-disable-proxy-controllers to app blueprint #4037

Merged

Conversation

cibernox
Copy link
Contributor

@cibernox cibernox commented May 8, 2015

This addon reexports Ember.Controller as App.ObjectController and App.ArrayController.

Including this addon in new apps will make generated controllers be always regular Ember.Controller, remove lots of deprecation warnings and make migration to ember 2 easier.

Idea from @rwjblue in emberjs/ember.js#11070

@rwjblue
Copy link
Member

rwjblue commented May 8, 2015

👍

@cibernox
Copy link
Contributor Author

cibernox commented May 8, 2015

Is it possible to retrigger the build in app veyor? Failed because of NPM install.

@rwjblue
Copy link
Member

rwjblue commented May 8, 2015

Restarted

@cibernox cibernox force-pushed the include-ember-disable-proxy-controllers branch 2 times, most recently from 3b6b049 to b879443 Compare May 8, 2015 20:31
@cibernox
Copy link
Contributor Author

cibernox commented May 8, 2015

Ok, I give up. I retried appveyor 5 times.

@cibernox cibernox force-pushed the include-ember-disable-proxy-controllers branch from b879443 to 2ca085d Compare May 8, 2015 23:04
@cibernox cibernox force-pushed the include-ember-disable-proxy-controllers branch from 2ca085d to b997497 Compare May 9, 2015 22:11
@cibernox
Copy link
Contributor Author

Any feedback on this?

@abuiles
Copy link
Member

abuiles commented May 12, 2015

@cibernox seems like the appveyor failures are unrelated cc @raytiley ?

rwjblue added a commit that referenced this pull request May 12, 2015
…ntrollers

Add ember-disable-proxy-controllers to app blueprint
@rwjblue rwjblue merged commit 109794b into ember-cli:master May 12, 2015
@rwjblue
Copy link
Member

rwjblue commented May 12, 2015

Confirm.

@abuiles
Copy link
Member

abuiles commented May 12, 2015

@rwjblue shall we start the 0.13.x series with this?

@rwjblue
Copy link
Member

rwjblue commented May 12, 2015

I think this can still be 0.2.x, but we should call it out above the changelog (in the "important things to watch" section). This is only breaking if you add the addon when you were relying on ArrayController/ObjectController. We just need to make the messaging clear that you should only add this addon to your package.json for existing apps if you are comfortable with dealing with the fallout....

@cibernox cibernox deleted the include-ember-disable-proxy-controllers branch May 12, 2015 15:15
@cibernox
Copy link
Contributor Author

0.13? Why that change in numbers from 0.2.3?

As a note, with this addon only people creating their own App.ObjectController/App.ArrayController will be affected. Controllers that explicitly extend from Ember.Object/ArrayController won't break.

@cibernox
Copy link
Contributor Author

Most likely only autogenerated controllers will be affected.
I think that number of projects with their own overriden implementation of proxy controllers is absolutely minimal.

@rwjblue
Copy link
Member

rwjblue commented May 12, 2015

with this addon only people creating their own App.ObjectController/App.ArrayController will be affected

To clarify for others, this only affects auto-generated controllers (those that are not created as a module manually). IMHO, there really shouldn't be breakage...

@adamesque
Copy link

This broke my app — and worse, the breakage caused my tests (which i ran first after updating) to take 40x-100x longer to run, so it took me a little longer to figure out the cause.

This was the error that showed up in my console:

Uncaught Error: Assertion Failed: The value that #each loops over must be an Array. You passed '<DS.RecordArray:ember412>' (wrapped in (generated sites controller))

The offending line was an {{#each item in controller}} with an autogenerated ArrayController. Just wanted to leave a note for future googling.

@rwjblue
Copy link
Member

rwjblue commented May 19, 2015

@adamesque - Thanks for the note, hopefully helps others that run into this issue.

@Kerrick
Copy link

Kerrick commented May 19, 2015

This also broke my application. "The value that #each loops over must be an Array. You passed partner@controller:array:, but it should have been an ArrayController"

One fix, if you can't yet change your application code, is to simply uninstall the addon.

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.

None yet

5 participants