Skip to content

Improve shared-folder-prefix mismatch errors#367

Closed
davesnx wants to merge 1 commit intomainfrom
fix-shared-prefix-ppx-errors
Closed

Improve shared-folder-prefix mismatch errors#367
davesnx wants to merge 1 commit intomainfrom
fix-shared-prefix-ppx-errors

Conversation

@davesnx
Copy link
Copy Markdown
Member

@davesnx davesnx commented Apr 3, 2026

Summary

  • turn shared-folder-prefix mismatches into readable compiler errors that include the rewritten file path and the prefix the PPX received
  • catch the remaining uncaught Server_reason_react_ppx.Error branches for native react.server.function and JS react.client.component rewrites so these cases stop crashing the PPX
  • add native and melange cram regressions covering mismatched --shared-folder-prefix handling

Testing

  • opam exec -- dune build packages/server-reason-react-ppx/server_reason_react_ppx.cma --root /home/me/utopia/_opam/.opam-switch/sources/server-reason-react
  • opam exec -- dune runtest packages/server-reason-react-ppx --root /home/me/utopia/_opam/.opam-switch/sources/server-reason-react
  • opam exec -- dune runtest packages/server-reason-react-ppx/cram/shared-folder-prefix-native-error.t --root /home/me/utopia/_opam/.opam-switch/sources/server-reason-react
  • opam exec -- dune runtest packages/server-reason-react-ppx/cram/shared-folder-prefix-melange-error.t --root /home/me/utopia/_opam/.opam-switch/sources/server-reason-react

@davesnx davesnx closed this Apr 3, 2026
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.

1 participant