Skip to content

Rename Ast_untagged_variants to Runtime_attributes - #9514

Merged
cknitt merged 1 commit into
masterfrom
runtime-attributes
Dec 3, 2026
Merged

cknitt merged 1 commit into
masterfrom
runtime-attributes

Conversation

@cknitt

@cknitt cknitt commented Dec 3, 2026

Copy link
Copy Markdown
Member

Ast_untagged_variants reads and checks every attribute that sets how a value is represented at runtime, not just those for untagged variants:

Runtime_attributes says that, and fits next to Record_runtime and Variant_runtime. I didn't choose Runtime_annotations because the module already uses "runtime annotation" for the narrower @notUndefined/@instanceOf/@typeOf/class group.

Only the file and its references change: 13 files, including UntaggedVariants.md and an ounit test. The module also gets a short header comment. No behaviour changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gL4qcnMmoKbamLEyfN

The module reads and checks every attribute that sets a value's runtime
representation (@as, @tag, @unboxed, @notundefined, @instanceof, @typeof,
class annotations, and the __proto__ field name check), not just untagged
variants. The new name says that and matches Record_runtime and
Variant_runtime. No behaviour changes.

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

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Rename the compiler module Ast_untagged_variants to Runtime_attributes, since it handles all attributes that set runtime representation.

Semantic Diff

1 commit · Full page

Rename Ast_untagged_variants to Runtime_attributes

74b8aaf · cknitt + Claude · Dec 03, 2026, 12:13 UTC

The module reads and checks every attribute that sets a value's runtime representation (@as, @tag, @unboxed, @notUndefined, @instanceOf, @typeOf, class annotations, and the __proto__ field name check), not just untagged variants. The new name says that and matches Record_runtime and Variant_runtime. No behaviour changes.

@cknitt
cknitt requested a review from fhammerschmidt December 3, 2026 12:15
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.54%. Comparing base (fe8c75b) to head (74b8aaf).

Files with missing lines Patch % Lines
compiler/typing/printtyp.ml 60.00% 2 Missing ⚠️
compiler/typing/ast_attributes.ml 0.00% 1 Missing ⚠️
compiler/typing/variant_type_spread.ml 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9514      +/-   ##
==========================================
- Coverage   82.54%   82.54%   -0.01%     
==========================================
  Files         469      469              
  Lines       66229    66227       -2     
==========================================
- Hits        54671    54669       -2     
  Misses      11558    11558              
Files with missing lines Coverage Δ
compiler/backend/lam_compile_primitive.ml 81.79% <ø> (ø)
compiler/typing/ast_checks.ml 81.60% <100.00%> (ø)
compiler/typing/includecore.ml 85.20% <100.00%> (ø)
compiler/typing/runtime_attributes.ml 88.35% <ø> (ø)
compiler/typing/transl_recmodule.ml 83.18% <100.00%> (ø)
compiler/typing/typedecl.ml 84.10% <100.00%> (-0.02%) ⬇️
compiler/typing/typetexp.ml 88.55% <ø> (ø)
compiler/typing/variant_coercion.ml 92.04% <100.00%> (ø)
compiler/typing/variant_layout.ml 94.64% <ø> (ø)
tests/ounit_tests/ounit_ast_helper_tests.ml 97.56% <100.00%> (ø)
... and 3 more
🚀 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 Dec 3, 2026

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 653,024,965 → 653,024,670 (±0.00%).

Generated projects: 627,284,147 → 627,284,326 (±0.00%).

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

Instructions

In total: 8,964,744,008 → 8,965,491,649 (+0.01%).

Benchmark Base Head Change
packages/@rescript/runtime/Stdlib_Math.resi 21,293,587 21,325,548 +0.15%
packages/@rescript/runtime/Stdlib_List.resi 24,486,161 24,518,279 +0.13%
packages/@rescript/runtime/Stdlib_Temporal_PlainDate.res 24,116,621 24,148,189 +0.13%
packages/@rescript/runtime/Stdlib_Temporal_PlainDateTime.res 25,561,813 25,594,545 +0.13%
packages/@rescript/runtime/Stdlib_String.resi 29,432,070 29,462,987 +0.11%
parse/RedBlackTree.res 14,948,647 14,964,288 +0.10%

Output size

In total: 27,427,708 → 27,427,693 (±0.00%).

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

Pull request 74b8aaf compared with base fe8c75b in this run.

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 74b8aaf

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

@cknitt

cknitt commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

@codex review

@cknitt
cknitt marked this pull request as ready for review December 3, 2026 13:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 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-12-03T13:08:55.924293Z 74b8aaf 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. Already looking forward to the next diff.

Reviewed commit: 74b8aaf117

ℹ️ 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 f361470 into master Dec 3, 2026
22 checks passed
@cknitt
cknitt deleted the runtime-attributes branch December 3, 2026 14:36
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