Skip to content

Test the evaluation order of a dict spread with children in JSX preserve mode - #9057

Merged
cknitt merged 1 commit into
masterfrom
jsx-dict-order-test
Oct 26, 2026
Merged

cknitt merged 1 commit into
masterfrom
jsx-dict-order-test

Conversation

@cknitt

@cknitt cknitt commented Oct 26, 2026

Copy link
Copy Markdown
Member

Closes #8757.

#8747 made JSX preserve mode print a dict spread as separate JSX props with children moved last, so in

<LoggedDict {...dict{...dictBase, "children": note("children"), "title": note("title")}} />

title was evaluated before children. #8754 already fixed this by keeping the dict as one spread object. This PR adds the case to jsx_preserve_semantics/cases/Order.res, which records the effect order in both builds and compares them.

I checked that the test catches the regression: after a hand edit that puts the #8747-shaped output back into the preserved Order.jsx, the comparison fails with title, children against children, title.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NLAPXPM9xbC6L6jutL4PDo

…rve mode

#8747 printed such a spread as separate JSX props with the children last,
so a later field was evaluated before them; #8754 fixed it. The plain and
preserve builds now record and compare that order. Closes #8757.

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

Copy link
Copy Markdown

Changelog

No changelog entry.

Semantic Diff

1 commit · Full page

Test the evaluation order of a dict spread with children in JSX preserve mode

d36fbdd · cknitt + Claude · Oct 26, 2026, 18:30 UTC

#8747 printed such a spread as separate JSX props with the children last, so a later field was evaluated before them; #8754 fixed it. The plain and preserve builds now record and compare that order. Closes #8757.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.42%. Comparing base (9e88874) to head (d36fbdd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9057   +/-   ##
=======================================
  Coverage   81.42%   81.42%           
=======================================
  Files         459      459           
  Lines       64547    64547           
=======================================
+ Hits        52558    52559    +1     
+ Misses      11989    11988    -1     

see 1 file with indirect coverage changes

🚀 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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: d36fbdd

@cknitt cknitt added the changelog:skip No release notes needed label Oct 26, 2026
@github-actions

Copy link
Copy Markdown

@cknitt

cknitt commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@cknitt
cknitt marked this pull request as ready for review October 26, 2026 19:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:54:58.270907Z d36fbdd 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: d36fbdd6c0

ℹ️ 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 requested a review from cristianoc October 26, 2026 19:55
@cknitt
cknitt merged commit d19dccd into master Oct 26, 2026
26 of 27 checks passed
@cknitt
cknitt deleted the jsx-dict-order-test branch October 26, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip No release notes needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSX dictionary evaluation-order regression: fixed by #8754; test coverage requested

2 participants