|
2 | 2 | author: rescript-team
|
3 | 3 | date: "2022-08-24"
|
4 | 4 | previewImg: static/blog/rescript-launch/ReScript-3.jpg
|
5 |
| -title: ReScript 10.0.0 |
| 5 | +title: ReScript 10.0 |
6 | 6 | badge: release
|
7 | 7 | description: |
|
8 |
| - The first community-driven release. |
| 8 | + The first community powered release. |
9 | 9 | ---
|
10 | 10 |
|
11 |
| -**Compiler** |
| 11 | +** Introduction ** |
12 | 12 |
|
13 |
| -#### :boom: Breaking Change |
| 13 | +ReScript is a soundly typed language with an optimizing compiler focused on the JS platform. |
| 14 | +It's focused on type safety, performance and JS interop. |
14 | 15 |
|
15 |
| -- `bsconfig.json` does not support `// line` comments anymore. |
16 |
| - - Example: `"suffix": ".bs.js" // determine the suffix` |
17 |
| - - Fix: remove the comment and use standard json. |
18 |
| -- Changed return type of `Js.String.match_` as it was wrong. [#5070](https://github.com/rescript-lang/rescript-compiler/pull/5070) |
19 |
| - - Example: any use of `Js.String.match_` and `Js.String2.match_` |
20 |
| - - Fix: follow the type errors |
| 16 | +[ReScript@10.0](https://www.npmjs.com/package/rescript/v/10.0.0) is now available for testing, you can try it via |
21 | 17 |
|
22 |
| -#### :rocket: New Feature |
| 18 | +``` |
| 19 | +npm i rescript@next |
| 20 | +``` |
23 | 21 |
|
24 |
| -- New records with optional fields e.g. `type opt = {x: int, y?: string}` were added as an experimental feature [#5423](https://github.com/rescript-lang/rescript-compiler/pull/5423) [#5452](https://github.com/rescript-lang/rescript-compiler/issues/5452) [New Syntax](https://github.com/rescript-lang/syntax/pull/589/files) |
25 |
| -- Add support for `@new @variadic` (see https://github.com/rescript-lang/rescript-compiler/pull/5364) |
| 22 | +or |
26 | 23 |
|
27 |
| -#### :bug: Bug Fix |
| 24 | +``` |
| 25 | +npm i rescript@10.0.0 |
| 26 | +``` |
28 | 27 |
|
29 |
| -- Classify bigint correctly [#5351](https://github.com/rescript-lang/rescript-compiler/pull/5351) |
30 |
| -- Fixed crash in `rescript build` on Windows [#5516](https://github.com/rescript-lang/rescript-compiler/pull/5516) |
31 |
| -- Fixed `rescript init` command not working [#5526](https://github.com/rescript-lang/rescript-compiler/pull/5526) |
32 |
| -- Fix issue with compiler log not terminated that causes problems with editor extension not clearing issues when fixed [#5545](https://github.com/rescript-lang/rescript-compiler/issues/5545) |
| 28 | +The detailed changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md). |
33 | 29 |
|
34 |
| -##### :nail_care: Polish |
| 30 | +** Upgrade guide ** |
35 | 31 |
|
36 |
| -- Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10. |
| 32 | +Please see the detailed [changelog](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md) for breaking changes. |
37 | 33 |
|
38 |
| -- Proper M1 support (CI now supports M1 native builds) |
| 34 | +*TODO* |
39 | 35 |
|
40 |
| -**Syntax** |
| 36 | +** What's next ** |
41 | 37 |
|
42 |
| -#### :boom: Breaking Change |
| 38 | +The 10.0 release contains the changes (including breaking) and bug fixes to the compiler from the last year or so. This will be followed by release 10.1 which will contain the new features enabled by this, ranging from native support for async/await, to the new V4 version of JSX. |
43 | 39 |
|
44 |
| -- `@bs.send.pipe` is now removed. Earlier it was deprecated. |
45 |
| -- Missing labels in function application is now an error (https://forum.rescript-lang.org/t/ann-more-strict-checks-in-missed-labels/2117). |
46 |
| - - Example: `let f = (x, ~z) => x + z; f(1, 2)` |
47 |
| - - Fix: do `let f = (x, ~z) => x + z; f(1, ~z=2)` instead |
48 |
| -- Externals without `@val` annotations do not work anymore, and externals with `= ""` give an error. |
49 |
| - - Example: `external setTimeout: (unit => unit, int) => float = "setTimeout"` is not supported anymore. |
50 |
| - - Fix: use `@val external setTimeout: (unit => unit, int) => float = "setTimeout"` instead. |
51 |
| - - Example2: `@val external setTimeout: (unit => unit, int) => float = ""` is not supported anymore. |
52 |
| - - Fix2: use `@val external setTimeout: (unit => unit, int) => float = "setTimeout"` instead. |
53 |
| -- Strings processed at compile-time don't need escaping anymore. |
54 |
| - - Example: `let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g")`. |
55 |
| - - Fix: use `let blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g")` instead. |
56 |
| -- Remove parsing of "import" and "export" which was never officially supported https://github.com/rescript-lang/syntax/pull/597 https://github.com/rescript-lang/syntax/pull/599 |
57 |
| - - Example: `export type t = int` |
58 |
| - - Fix: `@genType type t = int` |
59 |
| - - Example2: `import realValue: complexNumber => float from "./MyMath"` |
60 |
| - - Fix2: `@genType.import("./MyMath") external realValue: complexNumber => float = "realValue"` |
| 40 | +** Acknowledgements ** |
61 | 41 |
|
62 |
| -#### :rocket: New Feature |
63 |
| - |
64 |
| -- Doc comments `/** ... */` are now supported. Inernally, they are attributes, so are only valid at positions where `@foo` is allowed, or a syntax error is given. Similarly for module-level `/*** comments */` that can go where `@@attributes` go. |
65 |
| - |
66 |
| -#### :bug: Bug Fix |
67 |
| - |
68 |
| -- Fix printing for inline nullary functor types [#477](https://github.com/rescript-lang/syntax/pull/477) |
69 |
| -- Fix stripping of quotes for empty poly variants [#474](https://github.com/rescript-lang/syntax/pull/474) |
70 |
| -- Implement syntax for arity zero vs arity one in uncurried application in [#139](https://github.com/rescript-lang/syntax/pull/139) |
71 |
| -- Fix parsing of first class module exprs as part of binary/ternary expr in [#256](https://github.com/rescript-lang/syntax/pull/256) |
72 |
| -- Fix formatter hanging on deeply nested function calls [#261](https://github.com/rescript-lang/syntax/issues/261) |
73 |
| - |
74 |
| -**Libraries** |
75 |
| - |
76 |
| -#### :boom: Breaking Change |
77 |
| - |
78 |
| -- **"Attributes not allowed here"**. If you see this error chances are you're using a ppx that needs updating to a new version. |
79 |
| - See an exampe of how to [update a ppx](https://github.com/zth/rescript-relay/pull/372) |
80 |
| - - Example: for `rescript-relay` 0.23.0 is not supported. |
81 |
| - - Fix: use `rescript-relay@beta` or the new version when released. |
82 |
| -- Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: https://github.com/rescript-lang/rescript-compiler/commit/0fd8bb0e77c4b0e96a9647ac8af614305057003f. |
83 |
| - |
84 |
| -#### :bug: Bug Fix |
85 |
| - |
86 |
| -- Fix library issue with missing `bytes_to_string` https://github.com/rescript-lang/rescript-compiler/issues/5573 https://github.com/rescript-lang/rescript-compiler/pull/5589 |
87 |
| - |
88 |
| -#### :nail_care: Polish |
89 |
| - |
90 |
| -- Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See [#5361](https://github.com/rescript-lang/rescript-compiler/pull/5361). |
91 |
| - |
92 |
| -**Playground** |
93 |
| - |
94 |
| -#### :house: Internal |
95 |
| - |
96 |
| -- Added `jsoo_playground_main.ml` as the rescript-lang.org playground bundle entrypoint |
97 |
| - |
98 |
| -#### :boom: Breaking Change |
99 |
| - |
100 |
| -- Removed Reason syntax support for the playground experience. See https://github.com/rescript-lang/rescript-compiler/pull/5375 |
| 42 | +This is the first community powered release. We would like to thank everyone from the community who volunteered their precious time to suport this project with contributions of any kind, from documentation, to PRs, to discussions in the forum. |
| 43 | +In particular, thank you @cknitt, @TheSpyder, @mattdamon108, @DZakh, @fhammerschmidt, @amiralies, @Minnozz, @Zeta611, @jchavarri, @nkrkv, @whitchapman, @ostera, @benadamstyles, @cannorin, @ClaireNeveu, @kevinbarabash, @JsonKim, @Sehun0819, @glennsl, @namenu, @a-c-sreedhar-reddy. |
0 commit comments