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

[Super errors] Make the second worst ReasonReact error a bit shorter #2612

Merged
merged 2 commits into from Mar 13, 2018

Conversation

chenglou
Copy link
Member

The "state escape scope" one.

This one shouldn't catch any false positives, so we can safely remove
the original type clash error.

Also, we only detected state escaping scope, not that it's actually
related to ReasonReact.componentSpec. So every state escape scope error
ended up giving a ReasonReact error correction tip. This is fixed now.
Sorry about that.

The "state escape scope" one.

This one shouldn't catch any false positives, so we can safely remove
the original type clash error.

Also, we only detected state escaping scope, not that it's actually
related to ReasonReact.componentSpec. So every state escape scope error
ended up giving a ReasonReact error correction tip. This is fixed now.
Sorry about that.
@chenglou
Copy link
Member Author

chenglou commented Mar 13, 2018

Before:
screenshot 2018-03-12 18 21 14

After:
screenshot 2018-03-12 18 20 36

cc @sgrove @bsansouci @cristianoc

]
*)
(* recursively walk the trace from right to left, calling f and checking if f matches part of the trace *)
let check_each_trace_chunk_bottom_up f = fun t ->
Copy link
Member Author

Choose a reason for hiding this comment

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

@cristianoc much clearer imo. And performant

@chenglou chenglou merged commit 081a517 into rescript-lang:master Mar 13, 2018
@chenglou chenglou deleted the rrrrr branch March 13, 2018 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant