-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Loosen assertion so it matches any production error #8907
Conversation
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.
I guess this is fine, but does this mean the message is different?
I would assume it means it is crashing for a different reason. |
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.
Can we figure out why this is different?
The exact error code isn't important.
It was because the message was slightly different, which I fixed in 2afcf6e I figured loosening the invariant made sense, anyway. Although after rebasing, now I'm having a different problem where the error code transform isn't picking up that invariant, but works for other invariants in the same file. Weird. |
Ah, the message is the same as Stack but the template string passed to Also, we haven't run |
I guess it happens before release so it's not a big deal. (Or does it...?) |
Yea, it's in the release guide so shouldn't be necessary. |
The production error code system depends on the exact template string that is passed to `invariant`. This changes the Fiber templates to match the Stack ones.
0936484
to
ea2aa6e
Compare
@spicyj Going to assume this is good to merge now that we know why the codes were different (they're the same now), since you approved it earlier. |
I don't think we should loosen this unnecessarily – even if format changes are okay, problems building the URL or similar could surface and be caught by the old test. Can we revert this? (If I rescind my acceptance then please don't consider a PR accepted.) |
Ok I'll revert it and open a separate PR without the change to the test. |
And sorry, I didn't intentionally ignore your review... I thought it was ambiguous whether you had "rescinded" it or not, since there were two reviews, hence my comment :D |
Latest review wins. :) |
This test was failing because the error code didn't match. The specific error code isn't important.