Skip to content

Remove OCaml leftovers - #8805

Merged
cknitt merged 6 commits into
masterfrom
remove-ocaml-leftovers
Oct 12, 2026
Merged

cknitt merged 6 commits into
masterfrom
remove-ocaml-leftovers

Conversation

@cknitt

@cknitt cknitt commented Oct 12, 2026

Copy link
Copy Markdown
Member

Removes OCaml leftovers that ReScript code can't produce or reach. Each commit removes one:

  1. Warning numbers that no longer exist. The -warn-help descriptions still listed warnings 17, 18, 19, 25, 31, 36, 46, 55 and 59, which have no constructor anymore. The warning letters (c, k, l, m, s, v, x) and the defaults still pointed at removed numbers too: the default -w disabled 50, and the default -warn-error enabled 6. These are dropped from the descriptions, the letters, the defaults, the build schema, ERROR_VARIANTS.md and the dev playground's flags. No warning that can fire changes.
  2. Record_float_unused. This record representation was OCaml's float-only record. It is never created, and every match on it was assert false. It wasn't the last constructor of record_representation, so removing it changes the binary layout of type declarations, and the .cmi and .cmt magic numbers are bumped.
  3. The ns.braces attribute name. It is the pre-res name of res.braces. The v0 bridge still decoded it in PPX output, but nothing has produced it since the attribute was renamed.
  4. Unused Ast_helper functions. Const.int32/int64/char/float, Typ/Pat/Exp/Mty/Mod.attr and Te.decl/rebind have no callers.

User-facing OCaml leftovers stay out of this PR: the l integer suffix, the predefined End_of_file exception and the ocaml.* attribute aliases. Doc attributes users can write (@ocaml.doc, @ns.doc) are also unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1

cknitt and others added 5 commits October 11, 2026 20:31
Drop their descriptions, letter mappings and mentions in the default
warning settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1
Signed-off-by: Christoph Knittel <ck@cca.io>
Every match on it was `assert false`. Removing it changes the binary
layout of type declarations, so bump the .cmi and .cmt magic numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1
Signed-off-by: Christoph Knittel <ck@cca.io>
It is the pre-res name of res.braces and nothing produces it anymore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1
Signed-off-by: Christoph Knittel <ck@cca.io>
Const.int32/int64/char/float, the attr helpers and Te.decl/rebind came
from OCaml and have no callers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt marked this pull request as ready for review October 12, 2026 04:40
@cknitt

cknitt commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.40%. Comparing base (bbac536) to head (a125d6a).

Files with missing lines Patch % Lines
compiler/ext/warnings.ml 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8805      +/-   ##
==========================================
+ Coverage   80.38%   80.40%   +0.02%     
==========================================
  Files         447      447              
  Lines       60999    60984      -15     
==========================================
+ Hits        49034    49036       +2     
+ Misses      11965    11948      -17     
Files with missing lines Coverage Δ
compiler/gentype/translate_type_declarations.ml 89.51% <ø> (ø)
compiler/ml/ast_helper.ml 87.13% <ø> (+4.26%) ⬆️
compiler/ml/ast_mapper_from0.ml 76.62% <100.00%> (+0.25%) ⬆️
compiler/ml/matching.ml 77.24% <ø> (ø)
compiler/ml/printtyped.ml 0.00% <ø> (ø)
compiler/ml/rec_check.ml 46.95% <ø> (ø)
compiler/ml/translcore.ml 87.39% <ø> (ø)
compiler/ml/types.ml 71.05% <ø> (+1.82%) ⬆️
compiler/ext/warnings.ml 75.65% <0.00%> (ø)
🚀 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T04:42:57.666867Z 4bff2f4 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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8805

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: a125d6a

@github-actions

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bff2f4bdb

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

Comment thread compiler/ml/ast_mapper_from0.ml
@cknitt
cknitt requested a review from cristianoc October 12, 2026 06:38
@cknitt
cknitt enabled auto-merge (squash) October 12, 2026 07:16
@cknitt
cknitt merged commit cb53311 into master Oct 12, 2026
24 checks passed
@cknitt
cknitt deleted the remove-ocaml-leftovers branch October 12, 2026 07:31
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