Sketch: INTERNAL_MIXIN_EXTEND instead of static block for EmberObject - #21589
Closed
NullVoxPopuli-ai-agent wants to merge 1 commit into
Closed
NullVoxPopuli-ai-agent wants to merge 1 commit into
NullVoxPopuli-ai-agent wants to merge 1 commit into
Conversation
The public `extend` notifies when a registered deprecated mixin is
applied. EmberObject must still extend with `Observable`, so it needs a
silent path. The Symbol-keyed method mirrors `INTERNAL_MIXIN_CREATE`:
the public method is the notice plus the internal call.
This replaces the `static {}` block that applied `Observable` through
`PrototypeMixin.reopen`. EmberObject returns to the shape it had on
main: an anonymous intermediate class holds the mixin.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GSgBwzsjV3iTreDTN3fHZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comparison sketch for #21588, not necessarily for merge.
This replaces the
static {}block onEmberObjectwith anINTERNAL_MIXIN_EXTENDsymbol method onCoreObject. The symbol mirrorsextendthe wayINTERNAL_MIXIN_CREATEmirrorsMixin.create: the public method is the deprecation notice plus the internal call.Effects:
EmberObjectreturns to the shape it has onmain. The anonymous intermediate class comes back, withObservableon itsPrototypeMixin. TheEmberObjectdiff againstmainshrinks to one word.extenduses. That signature now appears twice incore.ts, which is the main cost.type-check:internalspasses. The browser deprecation tests did not run.If the flattening in #21588 was intentional, the
static {}block is required and this sketch does not apply.🤖 Generated with Claude Code
https://claude.ai/code/session_016GSgBwzsjV3iTreDTN3fHZ