ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Ember.A should not modify underlying array

Open wagenet opened this issue 3 years ago • 12 comments

Resolves #20219

wagenet avatar Oct 31 '22 21:10 wagenet

@wagenet note that "Extend Prototypes" is failing on CI.

chriskrycho avatar Nov 01 '22 00:11 chriskrycho

I think I'd like to put this behind a flag. I think (hope) it won't cause issues for people, but who knows what people are actually doing and whether they're relying on the mutating behavior.

wagenet avatar Nov 22 '22 23:11 wagenet

I agree that it should go behind a flag. Because many addons call A() on basically everything there are probably lots of components in production today that pass something through an addon helper such as {{map-by "id" this.posts}} and then rely on some prototype pollution elsewhere in a getter or action without realizing that the template code had modified the original this.posts. Being able to opt into this change seems like a good way to find out where the breaks are outside of the full deprecation in https://github.com/emberjs/rfcs/pull/864

jrjohnson avatar Jan 04 '23 21:01 jrjohnson

@wagenet I'm working on pushing tracked-built-ins to recommended and saw this PR. Is this something we still want to push forward?

locks avatar Aug 04 '23 15:08 locks

@locks This was partially motivated by issues Ember Data was having. @runspired what's the status of that stuff?

wagenet avatar Aug 18 '23 15:08 wagenet

still needed. iirc the solution for most has been to turn prototype extensions back on

runspired avatar Aug 21 '23 05:08 runspired

Is this still relevant?

kategengler avatar Dec 12 '23 16:12 kategengler

@kategengler I believe so

runspired avatar Dec 14 '23 23:12 runspired

@wagenet should we merge then?

kategengler avatar Dec 14 '23 23:12 kategengler

@kategengler I would like to and it is flagged so it should be safe. That said, I haven't really gotten a proper review from anyone still.

wagenet avatar Jan 10 '24 21:01 wagenet

@kategengler I would like to and it is flagged so it should be safe. That said, I haven't really gotten a proper review from anyone still.

I don't have a clue here or I would offer you one :) I'm just triaging PRs.

kategengler avatar Jan 10 '24 21:01 kategengler

can this be rebasod?

NullVoxPopuli avatar Jan 11 '24 15:01 NullVoxPopuli