Conversation
added 2 commits
March 14, 2023 09:56
AbhiPrasad
reviewed
Mar 14, 2023
|
|
||
| // It is very important that we return the original promise here, because Next.js attaches various properties | ||
| // to that promise and will throw if they are not on the returned value. | ||
| return maybePromiseResult; |
Contributor
There was a problem hiding this comment.
omg I actually can't believe they are doing this.
who attaches stuff to the promise directly????
AbhiPrasad
approved these changes
Mar 14, 2023
Contributor
AbhiPrasad
left a comment
There was a problem hiding this comment.
This feels like an anti-pattern.
Glad the tests caught this though!
Contributor
size-limit report 📦
|
Contributor
Author
I agree. Something feels off here. I don't know what. Maybe this will cause issues at some point. I also think flushing will be kinda messed up with this but I wanna worry about that later. |
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.
Our canary tests for Next.js started failing #7452 - in particular Next.js version
13.2.4.This was/is an actual bug that is fixed by that PR. Apparently, from that version onwards, Next.js attaches additional values to the promises returned from server components, and the way we wrapped server components we janked those values off the returned promise causing Next.js to crash.