-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[GLIMMER] Prevent auto-run assertion for objects not rendered. #14091
[GLIMMER] Prevent auto-run assertion for objects not rendered. #14091
Conversation
Prior to this change any `Ember.set` done after **any** rendering has been done during tests will trigger the auto-run assertion. This change prevents the auto-run assertion when a given object has not been used in rendering process.
@wycats / @krisselden - Would you mind reviewing this? If this is not correct, can you explain what I am forgetting/missing? |
FWIW, this fixes the errors under ember-alpha for ember-data (identified in emberjs/data#4503). |
I am 90% sure that this is fine, in fact we perhaps don't even need to bump |
I have doubts, i'd like to know the motivation |
There are any number of things that you may be doing that trigger a One example is a simply creating an array proxy ( |
"There are any number of things that you may be doing that trigger a propertyDidChange event that have nothing to do with rendering." This is a given, that is how it works now. |
I'm not sure I follow. On current alpha builds (before the change in this PR), anything that calls propertyDidChange (regardless of if it were used in the templating system) is going to trigger the auto-run assertion in test mode. This is definitely a change from current beta. I am unsure if it will affect folks trying to test glimmer or not... |
After thinking about it, if the view layer puts the tag onto anything it renders and CURRENT_TAG is unused by the view system, and observers then are used behind the tagged object going from view system to object layer, I think this change is good, but it should return early, not dirty CURRENT_TAG and we have to make sure we have no more CURRENT_TAG usage in the view layer. |
Replaced by #14093. |
☔ The latest upstream changes (presumably #14093) made this pull request unmergeable. Please resolve the merge conflicts. |
Prior to this change any
Ember.set
done after any rendering has been done during tests will trigger the auto-run assertion.This change prevents the auto-run assertion when a given object has not been used in rendering process.