RFC: ember data deprecate RSVP.Promise for native Promises#796
Merged
snewcomer merged 1 commit intoemberjs:masterfrom Mar 31, 2022
Merged
RFC: ember data deprecate RSVP.Promise for native Promises#796snewcomer merged 1 commit intoemberjs:masterfrom
snewcomer merged 1 commit intoemberjs:masterfrom
Conversation
02a2ae6 to
e5313dd
Compare
e5313dd to
c496797
Compare
mehulkar
reviewed
Feb 20, 2022
|
|
||
| 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/rsvp@4.8.5), this would allow us to remove a significant chunk of dependency weight. |
There was a problem hiding this comment.
10kb last I checked! https://twitter.com/mehulkar/status/1460864208203960325?s=21
runspired
approved these changes
Feb 20, 2022
c496797 to
29f96e2
Compare
locks
reviewed
Feb 23, 2022
|
|
||
| ## 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`. |
Contributor
There was a problem hiding this comment.
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?
sukima
reviewed
Mar 15, 2022
|
|
||
| ## 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.
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.
Contributor
There was a problem hiding this comment.
- 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.
Oh! This RFC is for Ember-data I thought it was for Ember proper gotcha. 👍
c7b1c83 to
2142022
Compare
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.
rendered