Releases: rescript-lang/rescript
Releases · rescript-lang/rescript
12.2.0-rc.1
💥 Breaking Change
js-post-buildnow passes the correct output file path based onin-sourceconfiguration: whenin-source: true, the path next to the source file is passed; whenin-source: false, the path in thelib/<module>/directory is passed. Additionally, stdout and stderr from the post-build command are now logged. #8190js-post-buildcommand now runs in the directory containing therescript.jsonwhere it is defined, instead of the unpredictable build invocation directory. This provides consistent behavior in monorepos. #8195
🚀 New Feature
- Reanalyze: add scoped
@@live/@@deadannotations 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
💥 Breaking Change
- Remove the legacy build system. Going forward, only the modern build system is supported, and the
rescript-legacycommand is not available anymore. #8186 #8212 - Remove support for
bsconfig.json. #8187 Int.fromStringandFloat.fromStringuse 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
es6andes6-global(superseded byesmodule). #8205 - Default to module system
esmodule. #8213 - Remove
external-stdlibconfiguration option fromrescript.json. This option was rarely used and is no longer supported. #8175 - Remove the deprecated uncurried
(. args) => ...function syntax. #8211 js-post-buildnow passes the correct output file path based onin-sourceconfiguration: whenin-source: true, the path next to the source file is passed; whenin-source: false, the path in thelib/<module>/directory is passed. Additionally, stdout and stderr from the post-build command are now logged. #8190js-post-buildcommand now runs in the directory containing therescript.jsonwhere 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, andbsc-flagsconfiguration options. Usedependencies,dev-dependencies, andcompiler-flagsinstead. #8196 bsc: remove legacy-uncurriedflag. #8201- Remove deprecated cli flags
--dev,--create-sourcedirsandbuild -w. #8202 - Do not allow two different package specs with the same suffix to avoid conflicts. #8214
🚀 New Feature
- Reanalyze: add scoped
@@live/@@deadannotations 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
12.1.0
🚀 New Feature
- Add support for
Set,Map,WeakSetandWeakMapto@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 forrescript-tools reanalyze -json. #8127 - Add support of
js-post-buildin 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
12.0.2
🚀 New Feature
- Reanalyze: add parallel processing for CMT file analysis with new
-paralleland-timingflags, 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
@valshadowing (rewrite usingglobalThis). #8098 - Fix
@scopeshadowing (rewrite usingglobalThis). #8100 - Formatter: normalize underscore placeholders in pipe expressions to canonical form (e.g.,
a->map2(_, fn)formats toa->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
🐛 Bug fix
- Fix exponential compilation blowup with large unboxed variants and dict pattern matching. #8078
- Rewatch: warnings for unsupported/unknown
rescript.jsonfields. #8031 - Fix missing
ignorefunction 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.jsonparsing 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
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
- New Build System
- Improved Standard Library
- Unified Operators
- F#-style binary operators
- Dict Literals and Pattern Matching
- Variant Pattern Spreads
- JSX Preserve Mode
- Function-Level Directives
- Regex Literals
- Experimental
let?Syntax
📋 More Information
12.0.0-rc.5
12.0.0-rc.4
💥 Breaking Change
- Fix some
Intlbindings (Intl.Collator.supportedLocalesOf,Intl.DateTimeFormat.supportedLocalesOf,Intl.ListFormat.supportedLocalesOf,Intl.NumberFormat.supportedLocalesOf,Intl.PluralRules.supportedLocalesOf,Intl.RelativeTimeFormat.supportedLocalesOf,Intl.Segmenter.supportedLocalesOf) which returnarray<string>and not their corresponding main typet. Also removeIntl.PluralRules.selectBigIntandIntl.PluralRules.selectRangeBigIntwhich don't work in many JS runtimes. #7995
🐛 Bug fix
- Fix fatal compiler error that occurred when an
%ffiextension 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
12.0.0-rc.3
🐛 Bug fix
- Fix
@directiveon 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_uncurriedhelpers. #7987
12.0.0-rc.2
💥 Breaking Change
- Replace binary operators with F#-style
~~~,^^^,&&&,|||. #7894
🐛 Bug fix
- Fix: use configured Jsx module for constraining component return type. #7945
- Undeprecate
Js_OOmodule since it is still used with the@thisattribute. #7955 - Fix crash when using bitwise not (
~~~) on an incompatible type. #7965
🏠 Internal
- JSX PPX: use
React.componentinstead ofReact.componentLikefor externals. #7952