Skip to content

Remove the ReScript-specific code - #228

Merged
cknitt merged 1 commit into
ocaml-onlyfrom
remove-rescript-code
Nov 5, 2026
Merged

cknitt merged 1 commit into
ocaml-onlyfrom
remove-rescript-code

Conversation

@cknitt

@cknitt cknitt commented Nov 5, 2026

Copy link
Copy Markdown
Member

Stacked on the npm/JS removal PR. Last step towards an OCaml-only repository: the code in src/ that only served ReScript goes.

  • @genType support: @genType, @genType.import and @genType.opaque kept the annotated value live (in implementations without an interface). They are now ordinary attributes.
    • ProcessDeadAnnotations has only Dead and Live.
    • The doGenType flag through processAttributes, collectExportLocations and structure is gone, along with the .cmti check that set it.
  • ReScript's lowercase JSX: the workaround for its generated emptyArray referencing itself.
  • BuckleScript: the unsafe_expr exclusion for primitives.

The comment on doExternals no longer cites a BuckleScript issue; the behaviour is unchanged.

User-facing change, in Changes.md: an unused [@genType] value is now reported. The deadcode example gains such a value (gentype_annotated) and its snapshot reports it. The previous binary didn't.

Testing

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT

reanalyze analyzes OCaml only; the ReScript version is developed in the
rescript monorepo. The code that only served ReScript goes:

- @Gentype, @genType.import and @genType.opaque annotations kept the
  annotated value live (in implementations without an interface). They
  are now ordinary attributes: ProcessDeadAnnotations has only Dead and
  Live, and the doGenType flag through processAttributes,
  collectExportLocations and structure is gone with the cmti check that
  set it.
- The workaround for ReScript's lowercase JSX, whose generated emptyArray
  referenced itself.
- The BuckleScript unsafe_expr exclusion for primitives.

The comment on doExternals no longer cites a BuckleScript issue; the
behaviour is unchanged. A sweep of the 69 review repros is identical; the
deadcode example gains an unused [@Gentype] value, now reported (the
previous binary hid it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT
@cknitt
cknitt added this pull request to stack #229 November 5, 2026 08:26
@cknitt

cknitt commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-11-05T08:47:59.136708Z 765f6f1 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: 765f6f12e1

ℹ️ 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 marked this pull request as ready for review November 5, 2026 09:14
@cknitt
cknitt requested a review from cristianoc November 5, 2026 09:15
@cknitt
cknitt merged commit d4066c6 into master Nov 5, 2026
7 checks passed
cknitt added a commit that referenced this pull request Nov 5, 2026
Releases the dead-code fixes of #224 (several build trees analyzed
together, type re-exports, optional-argument aliases, functions passed as
arguments, abbreviated function types), the move to an OCaml-only
repository (#226-#228, #231, including the removal of @Gentype support)
and the new minimum of OCaml 4.14 (#230).


Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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