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.observer deprecation with ember 1.13.5 #3574

Closed
mike-post opened this issue Jul 22, 2015 · 10 comments
Closed

Ember.observer deprecation with ember 1.13.5 #3574

mike-post opened this issue Jul 22, 2015 · 10 comments

Comments

@mike-post
Copy link

After upgrading to ember 1.13.5, ember-data 1.13.6 gives the following deprecation warning:

DEPRECATION: Passing the dependentKeys after the callback function in Ember.observer is deprecated. Ensure the callback function is the last argument.
        at Object.observer (http://localhost:4200/assets/vendor.js:27515:34)
        at http://localhost:4200/assets/vendor.js:75373:27
        at http://localhost:4200/assets/vendor.js:83902:4

It looks like this fixed in commit 8fb1166 (which is on master), but that commit did not make it into the 1.13.6 release.

@rwjblue
Copy link
Member

rwjblue commented Jul 22, 2015

@mike-post - Thanks for reporting! I saw @bmac mention this earlier and I believe that a 1.13.7 will be done in the next couple days to fix...

@denzo
Copy link

denzo commented Jul 23, 2015

Where can I find more info on Ember.observer deprecation?

@rwjblue
Copy link
Member

rwjblue commented Jul 23, 2015

@denzo - Generally, the CHANGELOG.md lists all the changes for a given version (at least I try to make sure that it does). It has this to say:

  • #11778 [DEPRECATION] Deprecate reverse argument ordering in Ember.observer.

That PR added the deprecation, and includes an example of the deprecated behavior.


tldr:

Deprecated:

Ember.observer(function() {
  // your stuff here
}, 'depKey1', 'depKey2');

Not deprecated:

Ember.observer('depKey1', 'depKey2', function() {
  // your stuff here
});

@igorT
Copy link
Member

igorT commented Jul 25, 2015

#3584 is the issue about making sure this makes it to a .13 point release

@igorT igorT closed this as completed Jul 25, 2015
@yankeeinlondon
Copy link

Hmmm ... I'm still getting this and am on 1.13.6. Stack:

DEPRECATION: Passing the dependentKeys after the callback function in Ember.observer is deprecated. Ensure the callback function is the last argument.
at observer (http://localhost:4200/assets/vendor.js:29044:34)
at :3110:23
at requireModule (:40:28)
at requireModule (:36:24)
at :6629:62
at triggerOnce (:6661:7)
at Object.runLoadHooks (http://localhost:4200/assets/vendor.js:48665:14)
at http://localhost:4200/assets/vendor.js:13980:32
at internalRequire (http://localhost:4200/assets/vendor.js:10636:16)

In fact I'm coding an addon at the moment so I'm pretty sure the

"ember-disable-prototype-extensions": "^1.0.0",

would block my code from using the aforementioned syntax. Wouldn't it?

@bmac
Copy link
Member

bmac commented Aug 5, 2015

@ksnyde I believe the issue was fixed in Ember Data 1.13.7.

@yankeeinlondon
Copy link

@bmac ok, just had a look and it's apparently not on bower yet. Will that be available soon?

@bmac
Copy link
Member

bmac commented Aug 5, 2015

Hmm, Thats strange I tought it was already on bower. https://github.com/components/ember-data/releases

I'll look into it.

@bmac
Copy link
Member

bmac commented Aug 5, 2015

@ksnyde I just created a new repo and updated the Ember Data entry in bower.json to 1.13.7 and I didn't have any issues installing the new version. Let me know if I'm missing something.

https://github.com/bmac/ember-data-test

@yankeeinlondon
Copy link

oh I'm sorry, I thought you were referring to ember not ember-data. I've actually removed all ember-data from this addon so it shouldn't be the source. Now I see that my google search landed me into the ember data repo. Oops.

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

6 participants