Skip to content

Releases: rescript-lang/rescript

13.0.0-alpha.5

13.0.0-alpha.5 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 10 Jul 07:27
3a9e5aa

💥 Breaking Change

  • Make Jsx.component abstract. #8390
  • Drop Node.js version 20.x support, as it is reaching EOL. #8401
  • Remove the @taggedTemplate decorator in favor of the new first-class taggedTemplate<'param, 'output> builtin type. Using the decorator, or backtick tagged-template syntax on a value that is not a taggedTemplate, is now a compile error pointing to the new binding form. #8461

🚀 New Feature

  • Add a first-class taggedTemplate<'param, 'output> builtin type and the TaggedTemplate stdlib module (TaggedTemplate.make). Tagged-template tags are now tracked through the type system, so they emit real JS tagged-template syntax across module boundaries, when passed as first-class values, and when constructed at runtime by a factory (e.g. postgres). #8461
  • Make mutation of private record mutable fields a configurable warning instead of a hard error. #8366
  • Add support for pattern matching/destructuring of record rest. #8317

🐛 Bug fix

  • Fix directive @warning("-102") not working. #8322
  • Fix duplicated comments in for..of formatter. #8395
  • Fix issue where warning 56 would blow up with dict{} patterns. #8403
  • Rewatch build lock fixes. #8409 #8410 #8413 #8424
  • Rewatch: treat transitive workspace dependencies as local packages in monorepo roots. #8411
  • Rewatch: use a single timestamp per compile pass. #8428
  • Fix rewatch warning replay after early compile errors. #8408
  • Fix formatting of trailing comments before = in let bindings. #8444
  • Fix analysis namespace parsing after the Yojson migration. #8454
  • Fix namespaced reference lookup in editor analysis. #8455
  • Fix analysis segmentation fault for references after #7887. #8477
  • Fix build crash when the compiler emits output that is not valid UTF-8, such as a truncated multibyte character in a code frame. #8482
  • Fix unnecessary boxing of Some(React.component). #8500
  • Fix GenType React element output to support React 19 typedefs. #8501

💅 Polish

  • Consolidate record mutation output into a single spread object literal. #8473
  • Improve default argument type mismatch errors. #8389
  • Resolve workspace dependencies in editor analysis. #8392
  • Build system: Add OpenTelemetry tracing support for cli commands. #8370
  • Use a single vendored @rescript/react package across the repo. #7525
  • Improve deprecated attribute extraction and support record form. #8396
  • Refactor analysis to decouple I/O from core logic. #8426
  • Deprecate Stdlib_Error and Stdlib_Exn modules in favor of JsError/JsExn. #8404
  • Remove vendored Json library and use yojson and lsp library for analysis. #8436
  • Improve clarity of various error and warning messages. #8460

🏠 Internal

  • Remove Primitive_option.toUndefined; use valFromOption for optional ffi args. #8380
  • Add a developer playground for testing the current compiler bundle locally and deploy the latest master build to GitHub Pages. #8435
  • Expand super_errors fixture coverage for warnings and errors. #8429
  • Run super_errors fixtures in parallel (~2.4× faster locally). #8430
  • Expand super_errors fixture coverage for the remaining reachable single-file error variants. #8432
  • Cache OPAM env, rewatch build, and instrumented dune state in the coverage workflow. #8434
  • Add a multi-file fixture harness (super_errors_multi) for cross-module errors and warnings. #8433
  • Catalog every named compiler error variant in tests/ERROR_VARIANTS.md and add fixtures for the remaining reachable ones. #8446
  • Remove dead and unreachable compiler error and warning variants; add fixtures for the ones found to be reachable. #8459
  • Convert OCaml codebase to snake case format. #8456
  • Analysis refactor: remove global state Shared_types.state. #8465
  • Refactor analysis CLI helpers to use source input. #8466
  • Include syntax, gentype, analysis, tools, and reanalyze tests in coverage reports. #8467
  • Remove the unreachable Longident.Lapply constructor (OCaml's applicative-functor path syntax F(X).t, which ReScript's grammar cannot produce). #8469
  • Refactor analysis for server side use. #8478
  • Remove unused files. #8481
  • Remove the dead Sig_class/Sig_class_type signature variants (OCaml class items, which ReScript cannot produce). #8470

12.3.0

Choose a tag to compare

@cknitt cknitt released this 20 May 06:03
44b1e4d

(No changes compared to 12.3.0-beta.1.)

🚀 New Feature

  • Reanalyze: add glob pattern support for suppress/unsuppress configurations (e.g., "src/generated/**"). #8277
  • Add optional ~locales and ~options parameters to String.localeCompare. #8287

🐛 Bug fix

  • Fix null and array values incorrectly matching the Object branch when pattern matching on JSON.t (or other untagged variants with an Object case) in statement position. #8279
  • Fix rewatch panic when package.json has no name field. #8291
  • Fix unpacking first-class module in default argument of react component. #8296
  • Fix exception record field regression. #8319
  • Rewatch: ignore stale lock for unrelated process name. #8316
  • Fix partial application generalization for .... #8343
  • Preserve JSX prop locations across the AST0 translation layer, fixing 0:0 editor diagnostics in PPX-related flows. #8350
  • Allow builds while watchers are running. #8349
  • Rewatch: preserve warnings after atomic-save full rebuilds. #8358
  • Fix type lowering for dict{} and async, so you don't need to annotate one extra time when the type is known. #8359
  • Fix issue where warning 56 would blow up with dict{} patterns. #8403
  • Rewatch build lock fixes. #8409 #8410 #8413 #8424
  • Rewatch: treat transitive workspace dependencies as local packages in monorepo roots. #8411

💅 Polish

  • Reanalyze server: redesign incremental fixpoint with delete-then-rederive strategy and predecessor tracking, improving speed on deletions. #8276
  • Improve error message for dependency without rescript.json. #8292
  • Resolve workspace dependencies in editor analysis. #8392
  • Improve deprecated attribute extraction and support record form. #8396
  • Improve default argument type mismatch errors. #8389

12.3.0-beta.1

12.3.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 17 May 06:35

🚀 New Feature

  • Reanalyze: add glob pattern support for suppress/unsuppress configurations (e.g., "src/generated/**"). #8277
  • Add optional ~locales and ~options parameters to String.localeCompare. #8287

🐛 Bug fix

  • Fix null and array values incorrectly matching the Object branch when pattern matching on JSON.t (or other untagged variants with an Object case) in statement position. #8279
  • Fix rewatch panic when package.json has no name field. #8291
  • Fix unpacking first-class module in default argument of react component. #8296
  • Fix exception record field regression. #8319
  • Rewatch: ignore stale lock for unrelated process name. #8316
  • Fix partial application generalization for .... #8343
  • Preserve JSX prop locations across the AST0 translation layer, fixing 0:0 editor diagnostics in PPX-related flows. #8350
  • Allow builds while watchers are running. #8349
  • Rewatch: preserve warnings after atomic-save full rebuilds. #8358
  • Fix type lowering for dict{} and async, so you don't need to annotate one extra time when the type is known. #8359
  • Fix issue where warning 56 would blow up with dict{} patterns. #8403
  • Rewatch build lock fixes. #8409 #8410 #8413 #8424
  • Rewatch: treat transitive workspace dependencies as local packages in monorepo roots. #8411

💅 Polish

  • Reanalyze server: redesign incremental fixpoint with delete-then-rederive strategy and predecessor tracking, improving speed on deletions. #8276
  • Improve error message for dependency without rescript.json. #8292
  • Resolve workspace dependencies in editor analysis. #8392
  • Improve deprecated attribute extraction and support record form. #8396
  • Improve default argument type mismatch errors. #8389

13.0.0-alpha.4

13.0.0-alpha.4 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 24 Apr 06:28
c0b1153

💥 Breaking Change

  • Support for break and continue in loops. break and continue are new keywords. #8348
  • Fix iterator / iterable typedefs, add generator typedefs. #8355
  • Remove deprecated %external extension. #8376
  • Remove Belt API functions returning undefined<'a> (e.g., Belt.Array.getUndefined). Functions returning option<'a> should be used instead (e.g., Belt.Array.get). #8377

🚀 New Feature

  • Implement for...of and for await...of loops. #7887
  • Add support for dict spreads: dict{...foo, "bar": 2, ...qux}. #8369
  • Rewatch: add --prod flag to build, watch, and clean to skip dev-dependencies and dev sources ("type": "dev"), enabling builds in environments where dev packages aren't installed (e.g. after pnpm install --prod). #8347
  • Rewatch: feature-gated source directories. Tag a source entry with "feature": "<name>" and select with --features a,b (or per-dep in dependencies / dev-dependencies) to include optional slices of a package's source tree at build time. Top-level features map supports transitive implications. #8379
  • Rewatch: improve watch output and add --clear-screen option. #8373
  • Add Dict.assignMany, Dict.concat, Dict.concatMany, Dict.concatAll, Array.concatAll to the stdlib. #8364

🐛 Bug fix

  • Fix partial application generalization for .... #8343
  • Rewatch: preserve warnings after atomic-save full rebuilds. #8358
  • Preserve JSX prop locations across the AST0 translation layer, fixing 0:0 editor diagnostics in PPX-related flows. #8350
  • Fix type lowering for dict{} and async, so you don't need to annotate one extra time when the type is known. #8359
  • Rewatch: don't suppress progress messages under -v/-vv. #8371
  • Rewatch: print 'Finished compilation' in watch plain output mode. #8372

💅 Polish

  • Allow builds while watchers are running. #8349
  • Rewatch: restore backward compatibility for bsconfig.json. #8368
  • Restore parsing of the legacy (. ...) uncurried syntax for backwards compatibility with libraries still on older ReScript versions; emit a deprecation warning when it is used. Rewatch also surfaces this specific deprecation when it originates from an external dependency so users can report breakage upstream. #8383
  • Rewatch: replace wave-based compile scheduler with a work-stealing DAG dispatcher ordered by critical-path priority, avoiding the per-wave stall on the slowest file. #8374

🏠 Internal

  • Move rescript.json reading out of bsc into rewatch; remove the custom OCaml JSON parser. #8365

13.0.0-alpha.3

13.0.0-alpha.3 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 10 Apr 14:21
069957a

💥 Breaking Change

  • Change Intl.Collator.compare return type from int to Ordering.t (float). #8289

🚀 New Feature

  • Reanalyze: add glob pattern support for suppress/unsuppress configurations (e.g., "src/generated/**"). #8277
  • Add optional ~locales and ~options parameters to String.localeCompare. #8287
  • Support inline records in external definitions. #8304

🐛 Bug fix

  • Reanalyze server: invalidate cache and recompute results when config changes in rescript.json. #8262
  • Fix null and array values incorrectly matching the Object branch when pattern matching on JSON.t (or other untagged variants with an Object case) in statement position. #8279
  • Fix rewatch panic when package.json has no name field. #8291
  • Fix unpacking first-class module in default argument of React component. #8296
  • Fix exception record field regression. #8319
  • Rewatch: ignore stale lock for unrelated process name. #8316
  • Fix handling of exotic identifiers for let bindings in GenType. #8315

💅 Polish

  • Improve error message for dependency without rescript.json. #8292

🏠 Internal

  • Reanalyze server: redesign incremental fixpoint with delete-then-rederive strategy and predecessor tracking, improving speed on deletions. #8276
  • Fix build tests failing silently. #8295

13.0.0-alpha.2

13.0.0-alpha.2 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 27 Feb 13:47

🐛 Bug fix

  • Fix compiler crash (Fatal error: Parmatch.all_record_args) when matching empty dict/record patterns. #8246
  • Fix null falling into the object branch instead of the wildcard when pattern matching on untagged variants with both Object and null cases. #8253

💅 Polish

  • Build system: Watch only source folders from build state instead of the entire project directory, and report missing configured source folders. #8219

🏠 Internal

  • Speed up dev container test by installing OCaml in docker image instead of in postCreate.sh. #8230

12.2.0

Choose a tag to compare

@cknitt cknitt released this 27 Feb 15:58

💥 New feature

  • Stdlib: Added Array.zip, Array.unzip, Array.zipBy, and Array.partition. #8244

🐛 Bug fix

  • Fix compiler crash (Fatal error: Parmatch.all_record_args) when matching empty dict/record patterns. #8246
  • Fix null falling into the object branch instead of the wildcard when pattern matching on untagged variants with both Object and null cases. #8253

12.2.0-rc.1

12.2.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 27 Jan 13:30
3156d4d

💥 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

13.0.0-alpha.1 Pre-release
Pre-release

Choose a tag to compare

@cknitt cknitt released this 23 Jan 15:24
963a0de

💥 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

Choose a tag to compare

@cknitt cknitt released this 13 Jan 11:43
c895a20

🚀 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