Skip to content

Remove ReasonReact and JSX v3 leftovers from analysis and genType - #9293

Merged
cknitt merged 3 commits into
masterfrom
remove-reason-react-leftovers
Nov 11, 2026
Merged

cknitt merged 3 commits into
masterfrom
remove-reason-react-leftovers

Conversation

@cknitt

@cknitt cknitt commented Nov 10, 2026

Copy link
Copy Markdown
Member

Removes leftovers of ReasonReact and the JSX v3 transform from editor analysis and genType, one commit each:

  • Jsx_hacks: kept ReasonReact's fragment out of the editor's index (a value in ReasonReact.res and references to ReasonReact.fragment). ReScript's JSX never produces it.
  • Reference heuristics for JSX v3 names: three cases in References.get_loc_item matched makeProps and createDOMElementVariadic, which only the JSX v3 transform generated. The heuristics that match by location alone stay, since they don't depend on those names.
  • genType's ReasonReact/ReactDOMRe mappings: ReactDOMRe.domRef, ReactDOMRe.Ref.currentDomRef and ReasonReact.reactElement were translated like their ReactDOM/React counterparts, and ReasonReact.res was skipped when resolving modules. Current React bindings have none of these modules; the React and ReactDOM mappings stay. A doc comment's example moved from ReasonReact.reactClass to React.component.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe

cknitt and others added 3 commits November 10, 2026 20:37
Jsx_hacks kept ReasonReact's `fragment` out of the editor's index, a
leftover from the ReasonReact JSX transform. ReScript's JSX doesn't
produce it, so the module and its two guards go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe
Signed-off-by: Christoph Knittel <ck@cca.io>
Three heuristics in References.get_loc_item matched makeProps and
createDOMElementVariadic, which only the JSX v3 transform generated.
The heuristics that match by location alone stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe
Signed-off-by: Christoph Knittel <ck@cca.io>
genType translated ReactDOMRe.domRef, ReactDOMRe.Ref.currentDomRef and
ReasonReact.reactElement, and skipped ReasonReact.res when resolving
modules. Current React bindings have none of these modules; the
ReactDOM and React mappings stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe
Signed-off-by: Christoph Knittel <ck@cca.io>
@github-actions

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Remove ReasonReact and JSX v3 leftovers from editor analysis and genType.

Semantic Diff

3 commits · Full page

Drop analysis's special case for ReasonReact.fragment

0397e07 · cknitt + Claude · Nov 10, 2026, 20:37 UTC

Jsx_hacks kept ReasonReact's fragment out of the editor's index, a leftover from the ReasonReact JSX transform. ReScript's JSX doesn't produce it, so the module and its two guards go.

Drop reference heuristics for JSX v3 names

6ee9580 · cknitt + Claude · Nov 10, 2026, 20:37 UTC

Three heuristics in References.get_loc_item matched makeProps and createDOMElementVariadic, which only the JSX v3 transform generated. The heuristics that match by location alone stay.

Drop genType's mappings for ReasonReact and ReactDOMRe types

0d9f2a4 · cknitt + Claude · Nov 10, 2026, 20:37 UTC

genType translated ReactDOMRe.domRef, ReactDOMRe.Ref.currentDomRef and ReasonReact.reactElement, and skipped ReasonReact.res when resolving modules. Current React bindings have none of these modules; the ReactDOM and React mappings stay.

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.99%. Comparing base (00e3f40) to head (0d9f2a4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9293      +/-   ##
==========================================
+ Coverage   81.97%   81.99%   +0.01%     
==========================================
  Files         456      455       -1     
  Lines       65671    65653      -18     
==========================================
- Hits        53836    53833       -3     
+ Misses      11835    11820      -15     
Files with missing lines Coverage Δ
analysis/src/process_cmt.ml 84.36% <100.00%> (-0.06%) ⬇️
analysis/src/process_extra.ml 87.34% <100.00%> (ø)
analysis/src/references.ml 70.51% <ø> (+2.28%) ⬆️
compiler/gentype/gentype_main.ml 82.14% <100.00%> (+1.19%) ⬆️
compiler/gentype/translate_type_expr_from_types.ml 89.88% <ø> (+0.99%) ⬆️
compiler/gentype/translation.ml 91.42% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 640,771,238 → 640,771,183 (±0.00%).

Generated projects: 920,861,847 → 920,863,020 (±0.00%).

None of the 265 benchmarks changed by 0.1% or more.

Instructions

In total: 9,211,172,146 → 9,211,280,806 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 25,843,198 → 25,842,868 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request 0d9f2a4 compared with base 00e3f40 in this run.

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9293

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9293

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9293

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9293

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9293

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9293

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9293

commit: 0d9f2a4

@github-actions

Copy link
Copy Markdown

@cknitt

cknitt commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@codex review

@cknitt
cknitt marked this pull request as ready for review November 11, 2026 12:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T12:37:53.522501Z 0d9f2a4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cknitt
cknitt enabled auto-merge (squash) November 11, 2026 12:37
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 0d9f2a4c1b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt
cknitt merged commit 469d677 into master Nov 11, 2026
22 checks passed
@cknitt
cknitt deleted the remove-reason-react-leftovers branch November 11, 2026 12:43
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.

2 participants