Deprecate PromiseProxyMixin, Enumerable and Observable per RFC 1116 - #21583
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
Contributor
There was a problem hiding this comment.
best viewed ignoring invis chars
Follow-up to emberjs#21577, which deprecated `Mixin.create` itself. The advancement RFC (emberjs/rfcs#1143) still lists these three public mixins as open work. Each mixin records its own deprecation notice in a WeakMap through `deprecatedMixin`. `CoreObject.extend` and both `reopen` methods read that map and fire the notice for each mixin they are given. `EmberObject` reopens its `PrototypeMixin` with `Observable` directly, which is what `extend` does internally, so apps that never name the mixin get no notice. `MutableEnumerable` shares the `deprecate-enumerable` id, because leaving it alone would leave an obvious hole in the same module. The three notices are available but not enabled, so they only fire when `_ALL_DEPRECATIONS_ENABLED` is set. Test suite is green in the default, all-deprecations, deprecations-as-errors, optional-features and production variants. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3ZrBpLnFsT39EKiAe4897
NullVoxPopuli-ai-agent
force-pushed
the
nvp/deprecate-mixin-followups
branch
from
August 26, 2026 23:15
b583c7c to
6a3047a
Compare
Contributor
|
Superseded by human: #21588 |
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.
Advancement:
"Deprecating Mixin Support"to Stage Ready for Release rfcs#1143RFC:
Follow-up to #21577. That PR deprecated
Mixin.createand listed three public mixins as remaining work. This PR deprecates those three.Ember.PromiseProxyMixin@ember/object/promise-proxy-mixindeprecate-promise-proxy-mixinEmber.Enumerable@ember/enumerabledeprecate-enumerableEmber.Observable@ember/object/observabledeprecate-observableMutableEnumerable(@ember/enumerable/mutable) also usesdeprecate-enumerable. It is the mutable half of the same module, so leaving it silent would leave a hole.All three are
available: 7.4.0,until: 8.0.0, and none are enabled yet.How the notice fires
Each mixin records its own notice through
deprecatedMixin, a new internalWeakMapin@ember/-internals/utils.CoreObject.extendand bothreopenmethods read that map and call the notice for each mixin they are given.Ember builds its own classes from the same mixins, so those paths avoid
extend.EmberObjectreopens itsPrototypeMixinwithObservablein a static block, which is whatextenddoes internally.@ember/arrayalready appliesEnumerableandObservablethroughINTERNAL_MIXIN_CREATE. Apps that never name a mixin get no notice.Mixin.create(Observable)gets no extra notice. Authoring a mixin already firesdeprecate-mixins.Not in this PR
Observable#getandObservable#setonEmberObjectstill work with no notice.EmberObjectis built fromObservable, so deprecating the methods needs the internals to stop calling them first, the same way Deprecate Evented and @ember/object/events per RFC 1111 #21542 movedRoute,EmberRouterandCoreViewoffEvented.Testing
Green in all five CI variants locally: default,
ALL_DEPRECATIONS_ENABLED,OVERRIDE_DEPRECATION_VERSION=15.0.0, optional features, and the production build. Node tests and the tree-shakability probe also pass.New tests live in
packages/@ember/object/tests/mixin/deprecation_test.js. They cover the notice for each mixin and the silence of the framework path (EmberObject.extend({}),A([]),ArrayProxy.create()).