-
-
Notifications
You must be signed in to change notification settings - Fork 407
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intent to RFC: Svelte Flags #532
Comments
Huge subscribe to this. This would be a fantastic reward for adopting new paradigms quickly and keeping the framework moving forward. Not sure if feasible, but it would also be great for addons to use the same mechanism to add custom deprecations and offer a way to shave off those bytes. |
This would be a great step forward for Ember's file size! I think another important and complementary approach is the long-talked-about npm-module-ification of Ember. Perhaps it warrants a different issue/intent to RFC, but I could see users either choosing to have a
explicitly want everything:
or don't want to include some or all of the deprecated (or soon-to-be-deprecated) parts:
This would provide a familiar API for choosing what to include or not include. That said, maybe this runs into the issue you alluded to where "many of these features are directly tied under the hood", and this module-based approach has the same issues as getting them to where they can be tree-shaken. |
The core goals of this pre-RFC have been for the most part implemented via the Deprecation Staging RFC: https://github.com/emberjs/rfcs/blob/master/text/0649-deprecation-staging.md As such, I'm going to close this! Thanks for the discussion everyone! |
Ember Octane is now nearing completion, and the core team is hard at work polishing up the final release, myself included. We're really excited about all of the new features and the new programming model, and are maintaining a laser focus on making sure it's a great experience for users who are upgrading, as well as users who are new to Ember altogether.
Because of this, we haven't really had time to focus on much else! I've stopped writing blog posts until Octane officially ships, and I know there has been considerably less activity on RFCs in general. However, community members have stepped up and kept the ball rolling with various RFCs, which has been amazing and encouraging - this is a sign of a strong and vibrant community!
I wanted to put a number of pre-RFCs out there, both to lay the path out for simplifying Ember and jumpstart discussion on the timing of various things, and in case anyone wants to pick one up. This is the first of those pre-RFCs: Svelte Flags
What Are They?
Svelte is an idea that has come up a number of times in Ember, and with some recent changes it's finally a possibility. The idea is that when we deprecate some functionality, we can also flag that functionality within Ember such that users can opt-out of it early on entirely. This has two major benefits:
Svelte flags will incentivize users to remove deprecated functionality sooner rather than later, since they can get real benefits from them today. Additionally, new applications can be made with the flags enabled by default, allowing us to market Ember as a smaller framework, and preventing new apps from accidentally relying on older functionality.
How Do They Work?
There are two major thoughts on how Svelte should work:
EmberObject
and computed properties are deprecated in v5.0.0, then it might be difficult to remove both at the same time.I personally think we need to have some ability to specify things directly, as in option 2, but I think we could do some combination of both as well.
What About Tree Shaking?
Tree-shaking is a great way to get similar benefits to Svelte, but reorganizing certain parts of Ember Metal to take advantage of it would be very difficult, and may even introduce performance regressions. This is because many of these features are directly tied under the hood, using shared abstractions like Ember's
meta
system.There are cases where tree-shaking absolutely makes sense, and we should continue to work on the codebase to get Ember to a place where various parts of the framework can be tree-shaken (one great example is the Router's location API, most people only use
history
orhash
, there's no need to ship all three!)The text was updated successfully, but these errors were encountered: