Skip to content

docs: resolve the remaining v13 documentation items from #1476 - #1491

Closed
fhammerschmidt wants to merge 8 commits into
rescript-lang:v13from
fhammerschmidt:docs/v13-checklist
Closed

fhammerschmidt wants to merge 8 commits into
rescript-lang:v13from
fhammerschmidt:docs/v13-checklist

Conversation

@fhammerschmidt

Copy link
Copy Markdown
Member

Resolves the open items of #1476 that can be done in the docs. Migration details go in the v13 migration guide (#1488); manual pages describe current behavior and link to the guide where needed, instead of carrying migration notes.

Stacked on #1488. Until that merges, this PR also shows its commits. Review the last two commits: docs: describe current v13 behavior instead of v12 leftovers and docs: document new v13 language and interop behavior.

Every new example was compiled with 13.0.0-alpha.7, and its JS output was generated by yarn test --update.

Pages that described v12 behavior

Page Change Compiler PR
Build Performance rescript build runs the OCaml build system. Removes the rescript-legacy, bstracing and Ninja sections. #8780, #8186
Code Analysis Drops the removed reanalyze -reactive flag; describes the incremental pipeline and stable finding order. #8648
Beyond JSX React.component is an abstract type, not a plain function; shows React.component(...). #8390
Object Assignment needs @set. Nullable properties are typed directly. Field @set is distinct from @get/@set externals. #8597
Installation, Embed Raw JS, debugger() lookup Link to the migration guide instead of inline migration notes.
Interop Cheatsheet Fixes outdated getter/setter anchors.

New sections

Page Section Compiler PR
Primitive Types Unicode escapes, including surrogate pairs, and how escaped strings match in patterns #8606
Primitive Types Parsing strings with Int/Float.fromString #8129
Function Arity must match, with the error and the fix #8559
Record Private records and warning 111, unlike object @set #8366
Bind to JS Function Inline record types in externals #8304
Import from / Export to JS Dynamically importing an external binding, with @scope paths and kept conversions #8582

Reviewed, no change needed

  • React 19 TypeScript output (#8501): no example uses JSX.Element.
  • Docgen schema (#8576): the site doesn't read the function details.
  • Argument order and defaults (#8572, #8568): no page makes claims about evaluation order.
  • unit aliases in FFI (#8581): no example returns a unit alias.
  • Diagnostics (#8559, #8597, #8619): no page quotes outdated compiler messages. The new error examples use alpha.7's wording.
  • @res.hoistedFunction (#8402): obsolete; removed again in alpha.7 (#8904). The migration guide covers the effect.

Testing

  • yarn test: 183 pages, with 0 stale outputs, 0 compilation errors, and 0 link or redirect issues.
  • The CI script tests pass, oxfmt --check passes, and git diff --check is clean.

Refs #1476.

🤖 Generated with Claude Code

fhammerschmidt and others added 8 commits November 24, 2026 09:45
Start a v13 migration guide covering build configuration: the
bsconfig.json fallback, deprecated key aliases, the removed
external-stdlib option, the esmodule default, legacy module names, and
the requirement for distinct suffixes when emitting multiple formats.
Order it before the v12 guide in the sidebar and regenerate route types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Language Changes section explaining that the %debugger extension
was removed in favor of the debugger() function, with the new syntax
error and a before/after diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- State that the guide is still being completed during the prereleases.
- Fix the esmodule default: it applies when package-specs is omitted;
  each spec still has to set module.
- Shorten the build configuration and %debugger sections without
  dropping any required change, and fix the external-stdlib note.
- Link the guide from the Build Configuration page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uide

Go through the compiler changelog for 13.0.0-alpha.1 to alpha.7 and add
every change that needs action when upgrading from v12:

- Before you upgrade: Node.js 22, no macOS Intel, run migrate-all on
  the latest 12.x for the removed v12 deprecations.
- Dependencies: Belt as @rescript/belt, removed Js namespace.
- Build system and CLI: removed commands and flags, new errors.
- Language: a table of removed syntax with replacements, plus other
  changes such as break/continue keywords, @unboxed, object @set.
- Standard library: Temporal, typed arrays, fromString, Intl.Collator,
  iterators, Int.Ref, removed primitives.

Changes reversed or backported to 12.x are left out, as are the
pending alpha.8 changes. Replacement examples were compiled against
13.0.0-alpha.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v13 docs only need the v13 migration guide. Remove the v11 and v12
guides from this branch and point every link to them at
v12.rescript-lang.org, where the v12 docs will live once v13 becomes
the default:

- The v13 guide tells v11 users to follow the v12 guide first.
- The bitwise operator syntax lookup pages and the 11.0 and 12.0
  release posts link to the v12 docs site.
- Redirect the old /docs/manual/migrate-to-v11 and -v12 URLs there,
  covered by the redirect check.
- Regenerate route types and use the v13 guide as the sample route in
  the route type test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v11 guide belongs with the v11 docs at v11.rescript-lang.org, not
the v12 docs site. Point the 11.0 release post and the redirect for
/docs/manual/migrate-to-v11 there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Build Performance: `rescript build` runs the OCaml build system;
  remove the rescript-legacy, bstracing and Ninja sections.
- Code Analysis: drop the removed `reanalyze -reactive` flag and
  describe the incremental pipeline and stable finding order.
- Beyond JSX: `React.component` is an abstract type, not a plain
  function; show `React.component(...)`.
- Object: assignment requires `@set`; type nullable properties
  directly; distinguish field `@set` from `@get`/`@set` externals.
- Fix outdated getter/setter anchors in the interop cheatsheet.
- Link the migration guide from the installation page, and replace
  the `%debugger` notes with links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the open documentation items from rescript-lang#1476, each checked against
13.0.0-alpha.7 with generated JS output:

- Primitive types: Unicode escapes, including UTF-16 surrogate pairs,
  and how escaped strings match in patterns (rescript#8606); what
  Int/Float.fromString accept (rescript#8129).
- Functions: arity is part of a function's type, with the error case
  and the fix (rescript#8559).
- Records: mutating a private record's mutable field gives warning 111
  (rescript#8366), unlike object fields, which need @set.
- Externals: inline record types for configuration objects
  (rescript#8304).
- Dynamic import of external bindings, including @scope paths and kept
  FFI conversions (rescript#8582).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fhammerschmidt

Copy link
Copy Markdown
Member Author

Replaced by #1493, which is stacked on #1492 (the migration guide), so it only shows its own commits.

This branch was successfully deployed

2 active deployments
preview — ed2bd419 Deployed Nov 24, 2026 by github-actions[bot]
guide-preview — ed2bd419 Deployed Nov 24, 2026 by github-actions[bot]
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