Skip to content

Releases: rescript-lang/rescript

12.2.0-rc.1

27 Jan 13:30
3156d4d

Choose a tag to compare

12.2.0-rc.1 Pre-release
Pre-release

💥 Breaking Change

  • js-post-build now passes the correct output file path based on in-source configuration: when in-source: true, the path next to the source file is passed; when in-source: false, the path in the lib/<module>/ directory is passed. Additionally, stdout and stderr from the post-build command are now logged. #8190
  • js-post-build command now runs in the directory containing the rescript.json where it is defined, instead of the unpredictable build invocation directory. This provides consistent behavior in monorepos. #8195

🚀 New Feature

  • Reanalyze: add scoped @@live/@@dead annotations for marking module/file sections as live or dead. #8197

🐛 Bug fix

  • Reanalyze: fix reactive/server stale results when cross-file references change without changing dead declarations (non-transitive mode). #8173
  • Reanalyze: link record/variant label liveness across type re-exports (type y = x = {...}). #8217
  • Add duplicate package detection to rewatch. #8180
  • Rewatch: do not warn about "reanalyze" config field. #8181
  • Fix error when importing CommonJS runtime modules with require(). #8194
  • Rewatch: fix warnings from non-recompiled modules being lost during incremental builds in watch mode. #8216

💅 Polish

  • Formatter no longer writes files when contents are already correctly formatted. #8209
  • Build system: Only log verbose "Generating AST for module" when actually parsing. #8210
  • Build system: Watch only source folders from build state instead of the entire project directory, and report missing configured source folders. #8219

13.0.0-alpha.1

23 Jan 15:24
963a0de

Choose a tag to compare

13.0.0-alpha.1 Pre-release
Pre-release

💥 Breaking Change

  • Remove the legacy build system. Going forward, only the modern build system is supported, and the rescript-legacy command is not available anymore. #8186 #8212
  • Remove support for bsconfig.json. #8187
  • Int.fromString and Float.fromString use stricter number parsing and no longer use an explicit radix argument, but instead support parsing hexadecimal, binary and exponential notation. #8129
  • Remove the deprecated module system names es6 and es6-global (superseded by esmodule). #8205
  • Default to module system esmodule. #8213
  • Remove external-stdlib configuration option from rescript.json. This option was rarely used and is no longer supported. #8175
  • Remove the deprecated uncurried (. args) => ... function syntax. #8211
  • js-post-build now passes the correct output file path based on in-source configuration: when in-source: true, the path next to the source file is passed; when in-source: false, the path in the lib/<module>/ directory is passed. Additionally, stdout and stderr from the post-build command are now logged. #8190
  • js-post-build command now runs in the directory containing the rescript.json where it is defined, instead of the unpredictable build invocation directory. This provides consistent behavior in monorepos. #8195
  • Remove support for deprecated bs-dependencies, bs-dev-dependencies, and bsc-flags configuration options. Use dependencies, dev-dependencies, and compiler-flags instead. #8196
  • bsc: remove legacy -uncurried flag. #8201
  • Remove deprecated cli flags --dev, --create-sourcedirs and build -w. #8202
  • Do not allow two different package specs with the same suffix to avoid conflicts. #8214

🚀 New Feature

  • Reanalyze: add scoped @@live/@@dead annotations for marking module/file sections as live or dead. #8197

🐛 Bug fix

  • Reanalyze: fix reactive/server stale results when cross-file references change without changing dead declarations (non-transitive mode). #8173
  • Reanalyze: link record/variant label liveness across type re-exports (type y = x = {...}). #8217
  • Add duplicate package detection to rewatch. #8180
  • Rewatch: do not warn about "reanalyze" config field. #8181
  • Fix error when importing CommonJS runtime modules with require(). #8194
  • Rewatch: fix warnings from non-recompiled modules being lost during incremental builds in watch mode. #8216

💅 Polish

  • Formatter no longer writes files when contents are already correctly formatted. #8209
  • Build system: Only log verbose "Generating AST for module" when actually parsing. #8210

12.1.0

13 Jan 11:43
c895a20

Choose a tag to compare

🚀 New Feature

  • Add support for Set, Map, WeakSet and WeakMap to @unboxed. #8009
  • Reanalyze: add reactive incremental analysis (-reactive, -runs, -churn) and Mermaid pipeline dumping (-mermaid). #8092
  • Reanalyze: add reanalyze-server (long-lived server) with transparent delegation for rescript-tools reanalyze -json. #8127
  • Add support of js-post-build in Rewatch. Note that ${file} is now an absolute path. #8151

🐛 Bug fix

  • Fix rewatch swallowing parse warnings (e.g., for %todo). #8135
  • Rewatch: log errors and warnings to stderr. #8147 #8148
  • Rewatch: warn about deprecated package specs es6/es6-global. #8146
  • Fix formatter removing doc comments for polymorphic variants. #8155

💅 Polish

  • Rewatch: enable --create-sourcedirs by default (now deprecated when explicitly used). #8092
  • Rewatch: check if filename case for interface and implementation matches. #8144

12.0.2

26 Dec 13:25
878b435

Choose a tag to compare

🚀 New Feature

  • Reanalyze: add parallel processing for CMT file analysis with new -parallel and -timing flags, plus benchmark infrastructure for performance testing. #8089

🐛 Bug fix

  • Reanalyze: make optional args analysis liveness-aware, preventing false positives when functions are only called from dead code. #8082
  • Fix: do not warn for "editor" field in rescript.json. #8084
  • Fix @val shadowing (rewrite using globalThis). #8098
  • Fix @scope shadowing (rewrite using globalThis). #8100
  • Formatter: normalize underscore placeholders in pipe expressions to canonical form (e.g., a->map2(_, fn) formats to a->map2(fn)). #8033
  • Fix rewatch panic on duplicate module name. #8102
  • Fix let? unwrap to use actual variable names from pattern instead of hardcoded "x"/"e". #8085
  • Fix "Ill-formed list of warnings" errors for PPXs with rescript-legacy. #8103
  • Fix gentype generating invalid syntax for exotic / escaped record field names and type names. #8087

🏠 Internal

  • Reanalyze: refactor DCE to pure pipeline architecture for order-independence and incremental update support. #8043

12.0.1

09 Dec 16:25
b7efc94

Choose a tag to compare

🐛 Bug fix

  • Fix exponential compilation blowup with large unboxed variants and dict pattern matching. #8078
  • Rewatch: warnings for unsupported/unknown rescript.json fields. #8031
  • Fix missing ignore function in some Stdlib modules. #8060
  • Fix signature matching for externals when abstract alias hides function arity. #8045
  • Fix arity detection for arrows returning nested generics. #8064
  • Fix error handling when rescript.json parsing fails and improve error message. #8067
  • Fix invalid JSX being generated for empty fragments. #8077

💅 Polish

  • Add missing deprecation and migration for Exn.Error. #8036

12.0.0

25 Nov 14:18
0e4bbcc

Choose a tag to compare

ReScript’s third major community-led release has arrived! This milestone wraps up a multi-year push to free the compiler from legacy limitations—and it comes loaded with new features and enhancements. 🎉

🚀 Highlights

📋 More Information

12.0.0-rc.5

21 Nov 10:54
ac0fc88

Choose a tag to compare

12.0.0-rc.5 Pre-release
Pre-release

🐛 Bug fix

  • Fix printing of tagged template literals. #8018
  • Fix printing of optional record fields in pattern matching errors. #8019

🏠 Internal

  • Editor: resolve @rescript/runtime via environment variable RESCRIPT_RUNTIME. #8023
  • Remove leftovers from @meth attribute. #8022

12.0.0-rc.4

14 Nov 16:13
6fe0f9d

Choose a tag to compare

12.0.0-rc.4 Pre-release
Pre-release

💥 Breaking Change

  • Fix some Intl bindings (Intl.Collator.supportedLocalesOf, Intl.DateTimeFormat.supportedLocalesOf, Intl.ListFormat.supportedLocalesOf, Intl.NumberFormat.supportedLocalesOf, Intl.PluralRules.supportedLocalesOf, Intl.RelativeTimeFormat.supportedLocalesOf, Intl.Segmenter.supportedLocalesOf) which return array<string> and not their corresponding main type t. Also remove Intl.PluralRules.selectBigInt and Intl.PluralRules.selectRangeBigInt which don't work in many JS runtimes. #7995

🐛 Bug fix

  • Fix fatal compiler error that occurred when an %ffi extension point contained invalid JavaScript. #7998

💅 Polish

  • Dedicated error messages for old Reason array literal syntax ([| and |]), and for the old pipe (|>). Primarly intended to help LLMs that might try to use old code patterns. #8010

🏠 Internal

  • Rename Core to Stdlib in tests/tests. #8005
  • CI: Build on windows-2025 runners. #8006
  • Rewatch: upgrade Rust to 1.91.0. #8007

12.0.0-rc.3

24 Oct 21:11
f3b1cb8

Choose a tag to compare

12.0.0-rc.3 Pre-release
Pre-release

🐛 Bug fix

  • Fix @directive on function level with async and multiple parameters. #7977
  • Fix fatal error for external with @as. #7978

💅 Polish

  • Rewatch: plain output when not running in tty. #7970
  • Streamline rewatch help texts. #7973
  • Rewatch: Reduced build progress output from 7 steps to 3 for cleaner, less verbose logging. #7971

🏠 Internal

  • Clean up usage of Ast_uncurried helpers. #7987

12.0.0-rc.2

17 Oct 13:05
635cee4

Choose a tag to compare

12.0.0-rc.2 Pre-release
Pre-release

💥 Breaking Change

  • Replace binary operators with F#-style ~~~, ^^^, &&&, |||. #7894

🐛 Bug fix

  • Fix: use configured Jsx module for constraining component return type. #7945
  • Undeprecate Js_OO module since it is still used with the @this attribute. #7955
  • Fix crash when using bitwise not (~~~) on an incompatible type. #7965

🏠 Internal

  • JSX PPX: use React.component instead of React.componentLike for externals. #7952