Skip to content

[BUGFIX LTS] Don't run getters while applying mixins - #20388

Merged
chriskrycho merged 3 commits into
masterfrom
fix-zebra-mixins
Mar 8, 2023
Merged

[BUGFIX LTS] Don't run getters while applying mixins#20388
chriskrycho merged 3 commits into
masterfrom
fix-zebra-mixins

Conversation

@wycats

@wycats wycats commented Mar 1, 2023

Copy link
Copy Markdown
Member

This change ensures that getters are never evaluated while applying
mixins.

It relies on the fact that all getters (including undecorated ones) get
converted into classic decorators when the mixin is originally created.

This change ensures that getters are never evaluated while applying
mixins.

It relies on the fact that all getters (including undecorated ones) get
converted into classic decorators when the mixin is originally created.
@chriskrycho

Copy link
Copy Markdown
Contributor

Looks like this is aimed at the issue ID'd in #19916?

@gitKrystan

Copy link
Copy Markdown
Contributor

@chriskrycho It's related to #18860 and #20129

@chriskrycho

Copy link
Copy Markdown
Contributor

Yep, and #20129 was a failing test for #19916. 👍🏞

@wycats

wycats commented Mar 3, 2023

Copy link
Copy Markdown
Member Author

@chriskrycho Do you mean to refer to "No documented public API for Owner"?

@chriskrycho

Copy link
Copy Markdown
Contributor

Nope, brain fog. I meant #18860, which Krystan linked. ðŸ˜Ū‍ðŸ’Ļ

@chriskrycho chriskrycho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small things and then we should be able to land and back port this. Thanks for getting it fixed!

Comment thread tsconfig.json Outdated
Comment thread packages/@ember/object/mixin.ts Outdated
wycats and others added 2 commits March 6, 2023 10:56
Co-authored-by: Chris Krycho <hello@chriskrycho.com>
@gitKrystan

Copy link
Copy Markdown
Contributor

@chriskrycho I think this is ready

@chriskrycho
chriskrycho merged commit 03bc5f9 into master Mar 8, 2023
@chriskrycho
chriskrycho deleted the fix-zebra-mixins branch March 8, 2023 01:11
@chriskrycho

Copy link
Copy Markdown
Contributor

I am planning to do an LTS release (so: back to 4.8) by the end of this week and will make sure this is included!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants