Repository navigation
RFC#1234 & RFC#1247: Drop the computed macro exports with EMBER_DROP_CLASSIC_FEATURES - #21740
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/computed` exports `undefined` for the 15 macros of the `deprecate-computed-macros` deprecation: `alias`, `and`, `bool`, `deprecatingAlias`, `equal`, `gt`, `gte`, `lt`, `lte`, `match`, `not`, `oneWay`, `or`, `readOnly` and `reads`. A cast keeps the published types. Tests of these macros skip with the flag, as they skip when the deprecation is removed. A new test checks that the exports are `undefined` in a build with the flag. 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,
82f2441334.With
EMBER_DROP_CLASSIC_FEATURES=true,@ember/object/computedexportsundefinedfor the 15 macros of thedeprecate-computed-macrosdeprecation (#21688):alias,and,bool,deprecatingAlias,equal,gt,gte,lt,lte,match,not,oneWay,or,readOnly,reads| undefined.empty,notEmpty,noneand the array macros stay, because other deprecations cover them.Tests
macro_decorators_test.jsthat check the "used without parameters" assertion.length_test.js: one test used a deprecated macro, but did not skip when the deprecation is removed. It skips now.packages/@ember/object/tests/computed/drop_classic_features_test.jschecks that the 15 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