Fatal error by some jsx / react ppx failures
Looking at react ppx's source there are some errors that are not raised via a location so the result is that just the ocaml excpetion is get printed by compiler.
@react.component
let make = React.null
Fatal error: exception Invalid_argument("react.component calls can only be on function definitions or component wrappers (forwardRef, memo).")
It'd be good if we handle these cases maybe in v4 ?
Not sure it's about v3 vs v4 but certainly a good time to look into that. What's needed is a way to hook this up to the compiler's error mechanism. So the important aspect is the fact that the ppx is part of the compiler now so it is doable.
The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.