Skip to content
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

Preserve error codes for invariants on www #12539

Merged
merged 2 commits into from
Apr 9, 2018

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Apr 4, 2018

Currently we don't do any invariant transformation in www. It has its own pipeline which strips invariant messages completely. But that leaves us worse off because we don't have any codes at all.

With this change, prod www bundles will contain the error codes and a special @preserve-invariant-messages directive that will prevent stripping their messages (since there’ll only be one in practice).

The downside of this change is that with JS debugging parameter set to true but in PROD mode you'd have to click an extra time to see the error. Maybe that's not too bad if we fix the error dialog to linkify links.

@gaearon gaearon requested a review from sophiebits April 4, 2018 16:17
@gaearon gaearon force-pushed the www-invariant-codes branch 3 times, most recently from 5e8ad95 to fbfc1fe Compare April 5, 2018 23:58
@gaearon
Copy link
Collaborator Author

gaearon commented Apr 6, 2018

Confirmed this works internally combined with D7526921.

screen shot 2018-04-06 at 1 20 03 am

@gaearon gaearon requested a review from bvaughn April 6, 2018 00:24
@gaearon gaearon force-pushed the www-invariant-codes branch 2 times, most recently from ab388e7 to 0eb9531 Compare April 6, 2018 00:44
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Quick smoke test and comparing builds looks okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants