docs: clarify the reachability-sweep class-member root set (#191 follow-up) - #196
Merged
Conversation
…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>
Benchmark: ✅ PASS
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs-only follow-up to #195 (the #191 reachability sweep), enriching the
sweepUnreachableEntriessection ofdocs/TYPE_MAPPING.md.What changed
@newctor,@sendmethods,@getgetters,@setwrite-only setters,@scopestatics (cross-checked againstemit.mjsand the v12 interop cheatsheet). Replaces the vague "class members".@setsetter or a@scopestatic 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 theclass-setter-static-reachablefixture (previously onlyreturn-only-generic-orphanwas linked), so a future maintainer won't trim the root walk back to getters.*Types.reshomes 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
main.mainbecause Fix #191: reachability sweep drops return-only-generic orphan records #195 is already merged (it can't be reopened to receive this).🤖 Generated with Claude Code