Repository navigation
RFC#1234 & RFC#1247: Drop the public mixin exports with EMBER_DROP_CLASSIC_FEATURES - #21741
Draft
NullVoxPopuli-ai-agent wants to merge 2 commits into
Draft
NullVoxPopuli-ai-agent wants to merge 2 commits into
NullVoxPopuli-ai-agent wants to merge 2 commits into
Conversation
`import.meta.env?.EMBER_DROP_CLASSIC_FEATURES` is a build-time flag for RFC 1247. Later changes read it where a classic feature is defined, and remove that feature from builds that set the flag. - `ImportMetaEnv` declares the flag for the type checks. - `EMBER_DROP_` is in the Vite `envPrefix`, so `EMBER_DROP_CLASSIC_FEATURES=true pnpm vite build` sets it for the tests. - CI has a "Classic features dropped" variant that builds and tests with the flag. - The hello-world smoke test sets the flag with a Vite `define` entry, so the package-size workflow measures an app without the classic features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the flag, `@ember/object/evented`, `@ember/object/observable`, `@ember/object/promise-proxy-mixin` and the `ControllerMixin` export of `@ember/controller` export `undefined`. A cast keeps the published types, and a type alias keeps the type half of each export. `Route`, `EmberRouter` and `CoreView` add `Evented` to their meta only so that `Evented.detect` stays true, so they skip that with the flag. The tests of these mixins skip with the flag. One test in `tracked-test.js` used `PromiseProxyMixin` without a skip for its removal, and has one now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Merge #21726 first. This PR sits on top of it. Review only the last commit,
376ff81830.With
EMBER_DROP_CLASSIC_FEATURES=true, four public mixin exports areundefined:@ember/object/evented@ember/object/observable@ember/object/promise-proxy-mixinControllerMixinfrom@ember/controller| undefined.import Eventedstill gives the interface type.Route,EmberRouterandCoreViewaddEventedto their meta only so thatEvented.detectstaystrue. They skip that step when the flag is set.Not behind the flag
Mixinfrom@ember/object/mixinEmberArray,MutableArray,NativeArrayfrom@ember/arrayEnumerable,MutableEnumerableMutableEnumerableis built fromEnumerablewhen the module loadsTests
tracked-test.js: one test usedPromiseProxyMixin, but did not skip when its deprecation is removed. It skips now.packages/@ember/object/tests/drop_classic_features_mixins_test.jschecks that the exports areundefined. It registers only with the flag.Checks
ALL_DEPRECATIONS_ENABLED=trueOVERRIDE_DEPRECATION_VERSION=15.0.0EMBER_DROP_CLASSIC_FEATURES=trueThe type checks of the internals and of the published types (with and without stable decorators),
eslint,prettierand the docs check pass.🤖 Generated with Claude Code