You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: markdown-pages/docs/manual/migrate-to-v12.mdx
+38-23Lines changed: 38 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,6 @@ If you encounter any missing information or issues during migration, please [ope
15
15
- ReScript V11 project.
16
16
- Uncurried mode must be enabled (i.e. you have not opted-out from it)
17
17
- Your project must not contain any OCaml source code anymore, as support for `.ml` files is removed in this version. However there are ways to convert OCaml syntax with an older ReScript compiler version ([see below](#converting-generated-ml-files)).
18
-
- The old configuration filename that was deprecated in v11, `bsconfig.json`, is removed. Rename it to `rescript.json`.
19
18
- Minimum supported Node.js version is 20.11.0
20
19
21
20
### Standard Library Changes
@@ -56,14 +55,14 @@ this is replaced by `@rescript/runtime`, which is a installed as a dependency of
Some projects still rely on tools such as `atdgen` that emit OCaml `.ml` files. ReScript 12 cannot compile those files directly, so you must keep using ReScript 11 **only** to convert the generated `.ml` files back to `.res` files before you run the v12 build.
211
+
**Note**: This setup is an escape hatch. It keeps legacy generators like `atdgen` working but it also forces you to maintain two compiler versions. Whenever possible migrate such things to modern ReScript tooling such as [Sury](https://github.com/DZakh/sury/).
212
+
213
+
Some projects still rely on tools such as `atdgen` that emit `.ml` files. ReScript 12 cannot compile those files directly, so you must keep using ReScript 11 **only** to convert the generated `.ml` files back to `.res` files before you run the v12 build.
195
214
196
215
1. Keep ReScript 12 as the sole compiler dependency in your main project (i.e. `devDependencies.rescript` stays at `^12.0.0`).
197
216
@@ -215,8 +234,6 @@ Some projects still rely on tools such as `atdgen` that emit OCaml `.ml` files.
215
234
npm run convert-ml
216
235
```
217
236
218
-
This setup is an escape hatch. It keeps legacy generators like `atdgen` working but it also forces you to maintain two compiler versions. Whenever possible migrate such things to modern ReScript tooling such as [Sury](https://github.com/DZakh/sury/).
219
-
220
237
## List of all breaking changes
221
238
222
239
Below is a consolidated excerpt of all the breaking changes from the compiler changelog.
@@ -252,11 +269,9 @@ Below is a consolidated excerpt of all the breaking changes from the compiler ch
252
269
253
270
### Build system & CLI
254
271
255
-
- The new Rust-based `rewatch` build system now powers the `rescript` command. The old Ninja-based builder system moved behind `rescript legacy`, and `--compiler-args` became the `compiler-args` subcommand. https://github.com/rescript-lang/rescript/pull/7551https://github.com/rescript-lang/rescript/pull/7593
256
-
- The `rescript legacy` subcommand was removed in favor of a stand-alone `rescript-legacy` binary. https://github.com/rescript-lang/rescript/pull/7928
272
+
- The new Rust-based `rewatch` build system now powers the `rescript` command. The old Ninja-based builder system moved behind `rescript legacy`, and `--compiler-args` became the `compiler-args` subcommand. https://github.com/rescript-lang/rescript/pull/7551https://github.com/rescript-lang/rescript/pull/7593https://github.com/rescript-lang/rescript/pull/7928
257
273
-`rescript format` was reimplemented in Rust, its options now use the `--check` / `--stdin` long-form spelling, and the `--all` flag was removed because every tracked file (non-dev by default) is formatted automatically. https://github.com/rescript-lang/rescript/pull/7603https://github.com/rescript-lang/rescript/pull/7752
258
274
- The `rescript dump` command was removed; call `bsc` directly if you need to inspect `.cmi` files. https://github.com/rescript-lang/rescript/pull/7710
259
-
-`rewatch` now builds packages marked with `"type": "dev"` (and their `dev-dependencies`) by default, and the CLI `--dev` flag no longer has any effect. https://github.com/rescript-lang/rescript/pull/7934
0 commit comments