Skip to content

docs: clarify the reachability-sweep class-member root set (#191 follow-up) - #196

Merged
jagguji merged 1 commit into
mainfrom
docs/sweep-root-set-clarify
Aug 18, 2026
Merged

docs: clarify the reachability-sweep class-member root set (#191 follow-up)#196
jagguji merged 1 commit into
mainfrom
docs/sweep-root-set-clarify

Conversation

@jagguji

@jagguji jagguji commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Docs-only follow-up to #195 (the #191 reachability sweep), enriching the sweepUnreachableEntries section of docs/TYPE_MAPPING.md.

What changed

  1. Precise ReScript v12 vocabulary for the class-member roots — names exactly what each member emits and therefore why it must be a root: @new ctor, @send methods, @get getters, @set write-only setters, @scope statics (cross-checked against emit.mjs and the v12 interop cheatsheet). Replaces the vague "class members".
  2. The completeness invariant + second fixture link — states why all binding class members must be roots: a type reached only through a @set setter or a @scope static has no other path, so dropping it dangles the external → ReScript compile error. This is the exact regression the Fix #191: reachability sweep drops return-only-generic orphan records #195 follow-up commit fixed; it's now written into the contract doc and linked to the class-setter-static-reachable fixture (previously only return-only-generic-orphan was linked), so a future maintainer won't trim the root walk back to getters.
  3. SCC acyclicity note — clarifies that ReScript's cross-file module graph must be acyclic (a dependency cycle between two *Types.res homes is a compile error), which is why an orphan removal can dissolve a forced merge (Stable, readable names for SCC-merged shared modules (probe I-9) #35).

Notes

🤖 Generated with Claude Code

…ow-up)

Enrich the sweepUnreachableEntries section of TYPE_MAPPING.md:
- name the exact ReScript v12 bindings each class-member root emits (@new ctor,
  @send methods, @get getters, @set write-only setters, @scope statics) instead
  of the vague "class members";
- state the completeness invariant — a type reached ONLY through a @set setter or
  a @scope static has no other path to a root, so dropping it dangles the external
  and fails to compile — and link the class-setter-static-reachable fixture that
  guards it (previously only return-only-generic-orphan was linked);
- note that ReScript's cross-file module graph must be acyclic, which is why an
  orphan removal can dissolve a forced SCC merge (#35).

Docs only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jagguji
jagguji deployed to benchmark August 17, 2026 14:20 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown

Benchmark: ✅ PASS

Package Compile Diff vs baseline usable review broken Verdict
@juspay/blend-design-system@0.0.36 identical 102 5 0 ✅ PASS
@juspay/blend-design-system@0.0.37-beta.8 identical 215 7 0 ✅ PASS
@juspay/blend-design-system@0.0.37 identical 219 7 0 ✅ PASS
react-day-picker@10.0.1 identical 19 7 0 ✅ PASS
react-tooltip@6.0.7 identical 1 0 0 ✅ PASS
react-markdown@10.1.0 identical 0 2 0 ✅ PASS
@smastrom/react-rating@1.5.0 identical 1 0 0 ✅ PASS
clsx@2.1.1 identical 0 0 0 ✅ PASS
hono@4.12.25 identical 0 0 0 ✅ PASS
@base-ui-components/react@1.0.0-rc.0 identical 174 21 0 ✅ PASS

@pkg-pr-new

pkg-pr-new Bot commented Aug 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@juspay/rescript-bindgen@196

commit: 46bad56

@jagguji
jagguji merged commit 9217280 into main Aug 18, 2026
12 of 13 checks passed
@jagguji
jagguji deleted the docs/sweep-root-set-clarify branch August 18, 2026 06:13
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