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

Fix issue 476 #477

Closed
wants to merge 1 commit into from
Closed

Fix issue 476 #477

wants to merge 1 commit into from

Conversation

ccantill
Copy link
Contributor

SetterObserver doesn't work if a property is already defined.

SetterObserver doesn't work if a property is already defined.
@ccantill ccantill changed the title Fix https://github.com/aurelia/binding/issues/476 Fix issue 476 Aug 11, 2016
@jdanyow
Copy link
Contributor

jdanyow commented Aug 22, 2016

closing because the root cause is the way babel transpiles the decorated props- see #406 for more info.

@jdanyow jdanyow closed this Aug 22, 2016
@doktordirk
Copy link
Contributor

@jdanyow @EisenbergEffect
a) i think the issue is more loganfsmyth/babel-plugin-transform-decorators-legacy#44 & tc39/proposal-class-public-fields#36
b) since you tell everyone to use that implementation of decorators, you can.t just get away with saying, "not our problem" and not trying to get it fixed
c) while i don.t think this fix is right, the basic idea hold s true. whatever the reason for not being able to use the getter/setter, it should fall back to dirty-checking, which from looking at the code it doesn.t

@ccantill you can fix it locally by adding @observable to your decorated proberties or use a fixed decorators implementation npm i github:doktordirk/babel-plugin-transform-decorators-legacy#release --save-dev

@ccantill
Copy link
Contributor Author

@jdanyow I agree that the way babel transpiles the decorated props wasn't optimal and that that fixes it, but I still think aurelia should fall back to dirty checking if it can't reconfigure the property rather than just failing silently. I'm sure there could be cases where a non-reconfigurable property needs to be observed without the possibility of changing the code for the property (third party libraries for example).

@doktordirk thanks! I was indeed using @observable as a temporary workaround.

@jdanyow
Copy link
Contributor

jdanyow commented Aug 23, 2016

@doktordirk / @ccantill We can't add dirty-checking to fix a transpilation issue because there are many members of the community that are trying to avoid dirty-checking at all costs. They would consider this fix to be a bug.

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.

3 participants