Skip to content

Sketch: INTERNAL_MIXIN_EXTEND instead of static block for EmberObject - #21589

Closed
NullVoxPopuli-ai-agent wants to merge 1 commit into
emberjs:nvp/deprecate-mixin-followupsfrom
NullVoxPopuli-ai-agent:nvp/internal-mixin-extend
Closed

NullVoxPopuli-ai-agent wants to merge 1 commit into
emberjs:nvp/deprecate-mixin-followupsfrom
NullVoxPopuli-ai-agent:nvp/internal-mixin-extend

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Comparison sketch for #21588, not necessarily for merge.

This replaces the static {} block on EmberObject with an INTERNAL_MIXIN_EXTEND symbol method on CoreObject. The symbol mirrors extend the way INTERNAL_MIXIN_CREATE mirrors Mixin.create: the public method is the deprecation notice plus the internal call.

Effects:

  • EmberObject returns to the shape it has on main. The anonymous intermediate class comes back, with Observable on its PrototypeMixin. The EmberObject diff against main shrinks to one word.
  • The heritage clause typechecks through the same overload signature that extend uses. That signature now appears twice in core.ts, which is the main cost.
  • type-check:internals passes. 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

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
@NullVoxPopuli
NullVoxPopuli deleted the nvp/internal-mixin-extend branch August 31, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants