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: _blogposts/2024-09-30-release-11-1-5.mdx
+14-97Lines changed: 14 additions & 97 deletions
Original file line number
Diff line number
Diff line change
@@ -23,107 +23,24 @@ JSX 3 has been officially deprecated. Moving forward, developers should only use
23
23
24
24
## Some parser and formatter fixes
25
25
26
-
On the way to remove the legacy `Pervasives` standard library out of the compiler, we adapted a lot of compiler tests and found some parser and formatter issues, see below:
26
+
On the way to remove the legacy `Pervasives` standard library out of the compiler, we adapted a lot of compiler tests and found and fixed some parser and formatter issues, for instance:
27
27
28
-
### Trailing Comma Issue Fixed in Partial Applications
28
+
-[Trailing Comma Issue Fixed in Partial Applications](https://github.com/rescript-lang/rescript-compiler/pull/6949)
29
+
-[Unary Operator Function Format Fix](https://github.com/rescript-lang/rescript-compiler/pull/6953)
30
+
-[Correct printing of module binding with signature](https://github.com/rescript-lang/rescript-compiler/pull/6963)
31
+
-[Comment Retention in Function Signatures with `type`](https://github.com/rescript-lang/rescript-compiler/pull/6997)
32
+
-[Parsing Error Fixed in Type Definitions](https://github.com/rescript-lang/rescript-compiler/pull/7001)
29
33
30
-
A bug that caused a trailing comma in partial applications (`...`) during long layout breaks has been fixed. This resolves formatting inconsistencies that could arise in such cases. [More details](https://github.com/rescript-lang/rescript-compiler/pull/6949).
34
+
## Compiler fixes
31
35
32
-
### Unary Operator Function Format Fix
36
+
The compiler also received some improvements, mostly around error reporting, (untagged) variant checks and producing more efficient code in uncurried mode. Furthermore, there were some Windows support improvements. Some notable changes are:
33
37
34
-
Previously, functions placed under unary operators could end up incorrectly formatted. This issue has now been resolved, ensuring that such scenarios are handled cleanly. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6953).
35
-
36
-
### Correct printing of module binding with signature
37
-
38
-
An issue where the module binding with a signature was incorrectly printed has been addressed. The formatting now works as expected, improving readability and reducing confusion. [Learn more](https://github.com/rescript-lang/rescript-compiler/pull/6963).
39
-
40
-
### Comment Retention in Function Signatures with `type`
41
-
42
-
Comments were sometimes removed when a function signature included the `type` keyword. This bug has been fixed, ensuring that comments remain intact and improve code clarity. [PR details](https://github.com/rescript-lang/rescript-compiler/pull/6997).
43
-
44
-
### Parsing Error Fixed in Type Definitions
45
-
46
-
A parsing error that occurred when a doc comment appeared before an "and" in a type definition has been corrected. Developers can now rely on proper parsing in such scenarios. [See the PR](https://github.com/rescript-lang/rescript-compiler/pull/7001).
47
-
48
-
### Tuple Coercion Fix
49
-
50
-
A bug in tuple coercion has been addressed, ensuring proper behavior in tuple-related type coercion. [More here](https://github.com/rescript-lang/rescript-compiler/pull/7024).
51
-
52
-
### Comment Handling in Uncurried Functions
53
-
54
-
The formatter now properly retains comments in the first argument of uncurried functions, improving code readability during formatting. [Details in the PR](https://github.com/rescript-lang/rescript-compiler/pull/6763).
55
-
56
-
### Parenthesis Retention in Pipe Operators
57
-
58
-
A formatter bug where parentheses were removed in pipe operators with anonymous uncurried functions has been fixed, ensuring that the intended operator precedence is preserved. [More details](https://github.com/rescript-lang/rescript-compiler/pull/6766).
59
-
60
-
### Improved Support for Capitalized Type Variables
61
-
62
-
A bug preventing capitalized type variables from being used in certain positions has been fixed, allowing greater flexibility in type variable naming. [Details here](https://github.com/rescript-lang/rescript-compiler/pull/6820).
63
-
64
-
## Compiler improvements
65
-
66
-
### Stricter Variant Spreading Rules
67
-
68
-
The compiler now disallows spreading anything other than regular variants inside other variants. This change enforces stricter type-safety rules, making your code more predictable and reducing potential edge-case errors. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6980).
69
-
70
-
### Improved Error Reporting in Tag Functions
71
-
72
-
Compiler error reports related to tag functions have been improved, ensuring accurate error locations for easier debugging. [Details in the PR](https://github.com/rescript-lang/rescript-compiler/pull/6816).
73
-
74
-
### Infinite Loops Fix in Recursive Types
75
-
76
-
An infinite loop issue arising from recursive types with type errors has been fixed. This significantly improves the compiler’s robustness when handling more complex type definitions. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6867).
77
-
78
-
### Better Handling of `@uncurry` in Uncurried Mode
79
-
80
-
The `@uncurry` attribute is now ignored in uncurried mode, preventing unnecessary runtime calls to `Curry`, which optimizes performance and reduces overhead. [More on the fix](https://github.com/rescript-lang/rescript-compiler/pull/6869). As uncurried mode will be the only mode of V12, the attribute will also be removed.
81
-
82
-
### Arity Adjustment Without `Curry` Calls
83
-
84
-
The compiler now avoids generating `Curry` calls when adjusting the arity of uncurried functions, further improving runtime efficiency. [Details in the PR](https://github.com/rescript-lang/rescript-compiler/pull/6870).
85
-
86
-
### Recursive Function Fix for `_param`
87
-
88
-
An uninitialized `_param` in recursive functions with unit arguments has been fixed, improving reliability in recursive function calls. [See the PR](https://github.com/rescript-lang/rescript-compiler/pull/6907).
89
-
90
-
### Optional Labels in Record Value Construction
91
-
92
-
An issue where optional labels were not considered during record value construction has been fixed, making record creation more consistent and error-free. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6798).
93
-
94
-
### Gentype Improvements for `Jsx.element`
95
-
96
-
A bug in Gentype when the `Jsx.element` type surfaced to the user has been addressed, ensuring better interoperability between Gentype and JSX elements. [Read more](https://github.com/rescript-lang/rescript-compiler/pull/6808).
97
-
98
-
### Untagged Variant Fixes
99
-
100
-
The compiler now correctly handles inclusion checks for untagged variants and improves the outcome printer to properly display tags. [Details in the PR](https://github.com/rescript-lang/rescript-compiler/pull/6669).
101
-
102
-
### Encoding Fix in Tagged Template Literals
103
-
104
-
An encoding issue in tagged template literals has been fixed, ensuring that template literals work correctly with special character encodings. [Learn more](https://github.com/rescript-lang/rescript-compiler/pull/6810).
105
-
106
-
### Switch Case Issue Fixed for Mixed Objects and Arrays
107
-
108
-
A bug causing incorrect switch case behavior when mixing objects and arrays with identical bodies has been resolved, improving the correctness of switch case statements. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6792).
109
-
110
-
## Platform support and build system
111
-
112
-
### Deno Compatibility on Windows
113
-
114
-
The ReScript compiler now resolves compatibility issues when using Deno on Windows, making development smoother for Windows users working with Deno. [Read more](https://github.com/rescript-lang/rescript-compiler/pull/6850).
115
-
116
-
### Windows 11 ARM Support
117
-
118
-
The compiler now supports Windows 11 ARM, using x64 binaries in emulation mode, expanding ReScript’s compatibility with new hardware architectures. [Learn more](https://github.com/rescript-lang/rescript-compiler/pull/6813).
119
-
120
-
### Build Fix Without `-warn-error`
121
-
122
-
A specific build issue that occurred when running the compiler without `-warn-error` has been resolved. This improves the flexibility of build configurations. [Learn more](https://github.com/rescript-lang/rescript-compiler/pull/6877).
123
-
124
-
### Omit Standard Library in Load Path
125
-
126
-
If the `-nostdlib` flag is set, the standard library directory will now be omitted from the load path, giving developers more control over their environment. [PR link](https://github.com/rescript-lang/rescript-compiler/pull/6833).
0 commit comments