[Bugfix Beta] Freeze attrs in debug#14265
Conversation
ac05cff to
320d127
Compare
320d127 to
58bc7de
Compare
|
I actually don't know if we can do this. If you use Specifically I ran into this with Link-to's use of |
|
Yep, that is exactly what #14264 is about. |
|
Discussed in Slack, I think changing these lines:
To use this as the guard: if (isFeatureEnabled('mandatory-setter') && !Object.isFrozen(parentValue)) {
}Should fix? |
|
It should fix it, to be honest it is annoying we haven't done this for frozen objects already |
|
@krisselden - Agreed. I think we also need to do something in the CP system (since |
|
That still goes through Ember.watch |
|
So guarding here causes a bunch of other things to break, about 1000 tests. |
|
☔ The latest upstream changes (presumably #14267) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@chadhietala that is because there are assumptions about state that it breaks that would need to be updated. addObserver is addListener + watch. cps use watch directly. there maybe some other cases with isWatching. Also maybe assumptions about corresponding state in mandatory setter. I didn't say it would be simple, I just think it is worth it. You should be able to render a frozen object in a template. |
|
Watching frozen objects works now. |
@rwjblue @krisselden I believe there were talks about freezing these as well. I think we want to make
attrspay as you go as well.