-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
RFC: ember data deprecate RSVP.Promise for native Promises #796
Conversation
02a2ae6
to
e5313dd
Compare
e5313dd
to
c496797
Compare
|
||
By removing `RSVP.Promise` in favor of native Promises, we can drop an unnecessary dependency for both client side and server side fetching of data. | ||
|
||
According to [bundlephobia](https://bundlephobia.com/package/[email protected]), this would allow us to remove a significant chunk of dependency weight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10kb last I checked! https://twitter.com/mehulkar/status/1460864208203960325?s=21
c496797
to
29f96e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor tweaks!
|
||
## How we teach this | ||
|
||
We do not believe this requires any update to the Ember curriculum. API documentation may be needed to remove traces of `RSVP.Promise`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to include the information that goes into the deprecation guide.
You will also need to document the optional feature, especially if you want to flip the availability down the line, right?
|
||
## How we teach this | ||
|
||
We do not believe this requires any update to the Ember curriculum. API documentation may be needed to remove traces of `RSVP.Promise`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been my experience that many feel that RSVP offers two features not available in native Promises: .hash()
and test waiters support (await settled()
support).
If this is not that case—
- Can we add to the "How we teach this" how to support
.hash()
or offer an alternative using native promises. - Can we add ti the "How do we teach this" an explanation why native promises are test-waiter compatible and that the integration that RSVP offered is no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- whether we return a native promise or an rsvp promise does not change anyone's ability to use
hash
. - good call out, it's unnecessary because the test waiters aren't waiting on RSVP Promises in this case either, they are waiting on various other things, which ember-data already installs waiters for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! This RFC is for Ember-data I thought it was for Ember proper gotcha. 👍
c7b1c83
to
2142022
Compare
rendered