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

Setting dependency keys using the .property() modifier has been deprecated #944

Closed
josemarluedke opened this issue Mar 5, 2019 · 4 comments

Comments

@josemarluedke
Copy link
Contributor

In a nearly generated app, using ember 3.9 beta the app gets a deprecation message. This is coming from the inspector. If I disable the inspector, my app does not get the deprecation.

deprecate.js:120 DEPRECATION: Setting dependency keys using the `.property()` modifier has been deprecated. Pass the dependency keys directly to computed as arguments instead. If you are using `.property()` on a computed property macro, consider refactoring your macro to receive additional dependent keys in its initial declaration. [deprecation id: computed-property.property] See https://emberjs.com/deprecations/v3.x#toc_computed-property-property for more details.
        at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:35082:23)
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:35176:11)
        at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:35109:11)
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:35176:11)
        at invoke (http://localhost:4200/assets/vendor.js:35188:11)
        at deprecate (http://localhost:4200/assets/vendor.js:35147:30)
        at ComputedProperty.property (http://localhost:4200/assets/vendor.js:14960:46)
        at <anonymous>:3617:8
        at requireModule (<anonymous>:39:28)

In a quick search, I found a few places using .property().

filtered: filter('model', function(item) {
return searchMatch(get(item, 'message'), this.get('search'));
}).property('model.@each.message', 'search'),

filtered: filter('model', function(item) {
return searchMatch(get(item, 'name'), this.get('search'));
}).property('model.@each.name', 'search'),

instrumentWithStack: computed({
get() {
return !!this.get('session').getItem('promise:stack');
},
set(key, value) {
this.get('session').setItem('promise:stack', value);
return value;
}
}).property(),

@RobbieTheWagner
Copy link
Member

We can likely remove the .property bits here. We'll look into it!

@gabz75
Copy link
Contributor

gabz75 commented Mar 18, 2019

Happy to work on this!

@vaidehijoshi
Copy link

👋 Hi there! I just ran into this deprecation while trying to use the inspector and happened upon this PR. I uninstalled/reinstalled the inspector only to realize that this PR hasn't actually been released yet? Any idea when it might be? It would be super helpful! 😅

@RobbieTheWagner
Copy link
Member

Hi @vaidehijoshi! Unfortunately, we have some bug fixes we have to get in first, and those are held up by ember-table breaking in Ember 3.9, so we're kind of in a tough spot where we have to fix some bugs, to fix some bugs, to fix some bugs. Hopefully soon though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants