Skip to content

Group the small runtime test suites - #9447

Draft
cknitt wants to merge 7 commits into
compiler-tests-dirfrom
runtime-test-suites
Draft

cknitt wants to merge 7 commits into
compiler-tests-dirfrom
runtime-test-suites

Conversation

@cknitt

@cknitt cknitt commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Groups the small runtime suites that scripts/test.js -mocha runs:

Now Before
tests/runtime_tests/belt/ tests/belt_tests
tests/runtime_tests/commonjs/ tests/commonjs_tests
tests/runtime_tests/docstrings/ tests/docstring_tests
packages/rescript-react/ tests/dependencies/rescript-react (the vendored @rescript/react that the playground and most test projects build against; no tests of its own)
tests/package_tests/platform_test.mjs tests/cli_tests/platform_test.mjs (it tests the npm package's platform mapping; next to cli/ it would be published)

The workspace paths in package.json and yarn.lock change. The packages keep their names.

packages/rescript-react must never be published:

  • It stays "private": true. publish.yml publishes every non-private workspace (yarn workspaces foreach --no-private).
  • It isn't under packages/@rescript/, so pkg-pr-new (which publishes ./packages/@rescript/*) and updateArtifactList.js (explicit list) leave it out.
  • The yarn constraint that gives our packages their version and metadata matched every @rescript/* workspace under packages, so it would have caught this one. It now matches only the root and packages/@rescript/*.
  • A new constraint requires "private": true on every other workspace, so yarn constraints fails CI if someone drops the flag.

Also removes the tests/tests fallback that #9446 added to the benchmarks.

Stacked on #9446.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo

cknitt and others added 2 commits November 27, 2026 06:23
belt_tests, commonjs_tests and docstring_tests were top-level siblings of
suites twenty to fifty times their size. They test the runtime and Belt, so
they now live in tests/runtime_tests as belt, commonjs and docstrings.
tests/dependencies held no tests, only the rescript-react project other
suites build against, and is now tests/fixtures. The one-file cli_tests
suite tests the npm package's platform mapping and moves to
tests/package_tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
The base of this pull request already has tests/compiler_tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt changed the base branch from master to compiler-tests-dir November 27, 2026 06:24
@cknitt
cknitt added this pull request to stack #9449 November 27, 2026 06:24
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Move the vendored rescript-react, which the playground and many tests build against, to packages/rescript-react, and require "private": true for every workspace that is not published.
  • Group the Belt, CommonJS and docstring suites under tests/runtime_tests and move the CLI platform test to tests/package_tests.

Semantic Diff

4 commits · Full page

Group the small runtime test suites

9a65e19 · cknitt + Claude · Nov 27, 2026, 06:20 UTC

belt_tests, commonjs_tests and docstring_tests were top-level siblings of suites twenty to fifty times their size. They test the runtime and Belt, so they now live in tests/runtime_tests as belt, commonjs and docstrings. tests/dependencies held no tests, only the rescript-react project other suites build against, and is now tests/fixtures. The one-file cli_tests suite tests the npm package's platform mapping and moves to tests/package_tests.

Drop the fallback to tests/tests in the benchmarks

177ba7e · cknitt + Claude · Nov 27, 2026, 06:23 UTC

The base of this pull request already has tests/compiler_tests.

Find the benchmarks' React fixture under its new name

9b8cd53 · cknitt + Claude · Nov 27, 2026, 06:42 UTC

compilerBenchmarks.js built the path to the rescript-react project from separate pieces, so the move to tests/fixtures missed it. It falls back to tests/dependencies for a base from before the move; the next pull request in the stack drops the fallback.

Move the vendored rescript-react to packages/rescript-react

5c355a7 · cknitt + Claude · Nov 27, 2026, 07:29 UTC

It is no test fixture: the playground depends on it and ships its compiled interfaces, and most test projects build against it. It now sits next to the playground packages, outside packages/@rescript, so pkg-pr-new, which publishes packages/@rescript/*, leaves it out.

The yarn constraint that gives our packages their release metadata matched every @rescript-scoped workspace under packages, so it would have set the rescript version on this one too. It now matches the root and packages/@rescript only. A new constraint requires "private": true for every other workspace, because the publish workflow publishes all workspaces that are not private.

@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (compiler-tests-dir@af84174). Learn more about missing BASE report.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             compiler-tests-dir    #9447   +/-   ##
=====================================================
  Coverage                      ?   82.23%           
=====================================================
  Files                         ?      462           
  Lines                         ?    65582           
  Branches                      ?        0           
=====================================================
  Hits                          ?    53929           
  Misses                        ?    11653           
  Partials                      ?        0           
🚀 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

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 638,385,027 → 638,384,622 (±0.00%).

Generated projects: 629,064,739 → 629,064,195 (±0.00%).

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

Instructions

In total: 9,221,543,506 → 9,221,543,506 (±0.00%).

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

Output size

In total: 26,070,038 → 26,070,038 (±0.00%).

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

Pull request 6a468b9 compared with base 61a7add in this run.

cknitt and others added 2 commits November 27, 2026 06:34
Brings the fix for the integration suite on Windows into this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
compilerBenchmarks.js built the path to the rescript-react project from
separate pieces, so the move to tests/fixtures missed it. It falls back to
tests/dependencies for a base from before the move; the next pull request in
the stack drops the fallback.

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

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 6a468b9

It is no test fixture: the playground depends on it and ships its compiled
interfaces, and most test projects build against it. It now sits next to the
playground packages, outside packages/@rescript, so pkg-pr-new, which
publishes packages/@rescript/*, leaves it out.

The yarn constraint that gives our packages their release metadata matched
every @rescript-scoped workspace under packages, so it would have set the
rescript version on this one too. It now matches the root and
packages/@rescript only. A new constraint requires "private": true for
every other workspace, because the publish workflow publishes all workspaces
that are not private.

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

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 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-27T09:49:58.586151Z 6a468b9 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. Hooray!

Reviewed commit: 5c355a7ea4

ℹ️ 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".

Brings the integration target fix from the Codex review into this branch.

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

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 3da7196bb0

ℹ️ 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".

Brings the integration target fixes from the Fable review into this branch.

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

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 6a468b995b

ℹ️ 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".

This branch has not been deployed

No deployments
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