Incoming private API breakage
ef4 opened this issue · 7 comments
Accessing anything on a ComputedProperty
instance is private API and is likely to break in the future (possibly the very soon future). This addon is accessing isDescriptor
:
The tl;dr is that everybody wants to make Ember.get
optional and just use real ES5 getters for computed properties. As soon as we do that, component.attributeBindings
will stop giving you a ComputedProperty
instance with an isDescriptor
, and would always return the value directly, even when it is implemented as computed property.
@ef4 any idea how we can figure out if attributeBindings
is writable within that code?
It seems that this code just warns and gives up when it can't write to attrributeBindings, so perhaps you can just try to set
and catch the error if it's a computed property without a setter, so as to convert the error into a pleasant warning.
guess I'll wait until this code actually breaks in canary and then we'll see how to fix/work around it
Yeah, that's reasonable. The relevant RFC is emberjs/rfcs#281
indeed, I'm just surprised that it works without issues in one of our apps that is running 3.0
It will only break if you happen to have attributesBindings as a computed property. It's not a common thing to do.