Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.2k
Stable decorators#20868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
ef4 wants to merge24 commits intomainChoose a base branch fromstable-field-decorators
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Stable decorators#20868
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
Rollup was actually dropping a side-effect that was intentionally part of a test.
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
Working on support for the stage3 decorator spec.
This branch is an attempt at complete drop-in support forall our decorators, even the wacky and wonderful old ones. I have the entire ember test suite passing locally.
My goal here is to show everything working with only the tiniest possible semantic changes andno mandatory syntactic change to auto-accessors.
You are still likely to want to convert to auto-accessors because they will perform much better. But keeping the old syntax working, even at a perf cost, would greatly ease upgrades.
Known semantic changes
TODO
tracked
andservice
. (I've already done this on prior attempts, it's the easier part. But I'll need to segregate them in their own test suite area, because I'm trying to keep everything working under both builds, and the old build won't support the syntax.)declare
. We probably can't make ember's own build typecheck under both configurations, but we can probably offer enough overrides to demonstrate different apps working under both configurations.tracked
get all the same computed property interop as the field form?addInitializer
the first time a class is instantiated. (Our field form oftracked
does a bunch of that, but the messiness there is more excusable since that's the allowed-to-be-slower legacy form.) This injects a little code intoevery object instantiation. Even in new apps that don't actually need it.