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: CHANGELOG.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,33 +10,58 @@
10
10
> -:house:[Internal]
11
11
> -:nail_care:[Polish]
12
12
13
-
# 12.0.0-alpha.14 (Unreleased)
13
+
# 12.0.0-alpha.15 (Unreleased)
14
+
15
+
#### :bug: Bug fix
16
+
17
+
- Ignore inferred arity in functions inside `%raw` functions, leaving to `%ffi` the responsibility to check the arity since it gives an error in case of mismatch. https://github.com/rescript-lang/rescript/pull/7542
18
+
- Pass the rewatch exit code through in wrapper script. https://github.com/rescript-lang/rescript/pull/7565
19
+
- Prop punning when types don't match results in I/O error: _none_: No such file or directory. https://github.com/rescript-lang/rescript/pull/7533
20
+
- Pass location to children prop in jsx ppx. https://github.com/rescript-lang/rescript/pull/7540
21
+
22
+
#### :nail_care: Polish
23
+
24
+
- Better error message for when trying to await something that is not a promise. https://github.com/rescript-lang/rescript/pull/7561
25
+
26
+
# 12.0.0-alpha.14
14
27
15
28
#### :boom: Breaking Change
16
29
30
+
-`Iterator.forEach` now emits `Iterator.prototype.forEach` call. https://github.com/rescript-lang/rescript/pull/7506
17
31
- Rename functions ending with `Exn` to end with `OrThrow`. The old `Exn` functions are now deprecated:
- Add `Array.findLast`, `Array.findLastWithIndex`, `Array.findLastIndex`, `Array.findLastIndexWithIndex` and `Array.findLastIndexOpt`. https://github.com/rescript-lang/rescript/pull/7503
29
51
- Add `options` argument to `Console.dir`. https://github.com/rescript-lang/rescript/pull/7504
30
52
- Show variant constructor's inline record types on hover. https://github.com/rescript-lang/rescript/pull/7519
53
+
- Add additional `Iterator.prototype` bindings to `runtime/Stdlib_Iterator.res`. https://github.com/rescript-lang/rescript/pull/7506
31
54
32
55
#### :bug: Bug fix
33
56
34
57
-`rescript-tools doc` no longer includes shadowed bindings in its output. https://github.com/rescript-lang/rescript/pull/7497
35
58
- Treat `throw` like `raise` in analysis. https://github.com/rescript-lang/rescript/pull/7521
36
59
- Fix `index out of bounds` exception thrown in rare cases by `rescript-editor-analysis.exe codeAction` command. https://github.com/rescript-lang/rescript/pull/7523
37
60
- Don't produce duplicate type definitions for recursive types on hover. https://github.com/rescript-lang/rescript/pull/7524
38
-
- Prop punning when types don't match results in I/O error: _none_: No such file or directory. https://github.com/rescript-lang/rescript/pull/7533
39
-
- Pass location to children prop in jsx ppx. https://github.com/rescript-lang/rescript/pull/7540
61
+
- Prop punning when types don't match results in `I/O error: _none_: No such file or directory`. https://github.com/rescript-lang/rescript/pull/7533
62
+
- Fix partial application with user-defined function types. https://github.com/rescript-lang/rescript/pull/7548
63
+
- Fix doc comment before variant throwing syntax error. https://github.com/rescript-lang/rescript/pull/7535
64
+
- Fix apparent non-determinism in generated code for pattern matching. https://github.com/rescript-lang/rescript/pull/7557
40
65
41
66
#### :nail_care: Polish
42
67
@@ -51,11 +76,15 @@
51
76
- In module declarations, accept the invalid syntax `M = {...}` and format it to `M : {...}`. https://github.com/rescript-lang/rescript/pull/7527
52
77
- Improve doc comment formatting to match the style of multiline comments. https://github.com/rescript-lang/rescript/pull/7529
53
78
- Improve error messages around type mismatches for try/catch, if, for, while, and optional record fields + optional function arguments. https://github.com/rescript-lang/rescript/pull/7522
79
+
- Sync reanalyze with the new APIs around exception. https://github.com/rescript-lang/rescript/pull/7536
- Sync API docs with rescript-lang.org on release. https://github.com/rescript-lang/rescript/pull/7555
54
82
55
83
#### :house: Internal
56
84
57
85
- Refactor the ast for record expressions and patterns. https://github.com/rescript-lang/rescript/pull/7528
58
86
- Editor: add completions from included modules. https://github.com/rescript-lang/rescript/pull/7515
87
+
- Add `-editor-mode` arg to `bsc` for doing special optimizations only relevant to the editor tooling. https://github.com/rescript-lang/rescript/pull/7541
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This is the ReScript compiler repository - a robustly typed language that compiles to efficient and human-readable JavaScript. ReScript is built using OCaml and includes a complete toolchain with compiler, build system, syntax parser, and standard library.
8
+
9
+
## Build Commands
10
+
11
+
### Basic Development
12
+
```bash
13
+
# Build compiler and copy executables
14
+
make
15
+
16
+
# Build in watch mode
17
+
make watch
18
+
19
+
# Build everything including standard library
20
+
make lib
21
+
22
+
# Build artifacts and update artifact list
23
+
make artifacts
24
+
```
25
+
26
+
### Testing
27
+
```bash
28
+
# Run all tests
29
+
make test
30
+
31
+
# Run specific test types
32
+
make test-syntax # Syntax parser tests
33
+
make test-syntax-roundtrip # Roundtrip syntax tests
34
+
make test-gentype # GenType tests
35
+
make test-analysis # Analysis tests
36
+
make test-tools # Tools tests
37
+
make test-rewatch # Rewatch tests
38
+
39
+
# Run single file test
40
+
./cli/bsc.js myTestFile.res
41
+
42
+
# View parse/typed trees for debugging
43
+
./cli/bsc.js -dparsetree myTestFile.res
44
+
./cli/bsc.js -dtypedtree myTestFile.res
45
+
```
46
+
47
+
### Code Quality
48
+
```bash
49
+
# Format code
50
+
make format
51
+
52
+
# Check formatting
53
+
make checkformat
54
+
55
+
# Lint with Biome
56
+
npm run check
57
+
npm run check:all
58
+
59
+
# TypeScript type checking
60
+
npm run typecheck
61
+
```
62
+
63
+
### Clean Operations
64
+
```bash
65
+
make clean # Clean OCaml build artifacts
66
+
make clean-all # Clean everything including Rust/gentype
67
+
```
68
+
69
+
## Compiler Architecture
70
+
71
+
The ReScript compiler follows this high-level pipeline:
72
+
73
+
```
74
+
ReScript Source (.res)
75
+
↓ (ReScript Parser - compiler/syntax/)
76
+
Surface Syntax Tree
77
+
↓ (Frontend transformations - compiler/frontend/)
78
+
Surface Syntax Tree
79
+
↓ (OCaml Type Checker - compiler/ml/)
80
+
Typedtree
81
+
↓ (Lambda compilation - compiler/core/lam_*)
82
+
Lambda IR
83
+
↓ (JS compilation - compiler/core/js_*)
84
+
JS IR
85
+
↓ (JS output - compiler/core/js_dump*)
86
+
JavaScript Code
87
+
```
88
+
89
+
### Key Directories
90
+
91
+
-**`compiler/syntax/`** - ReScript syntax parser (MIT licensed, separate from main LGPL)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Happy hacking!
14
14
15
15
> Most of our contributors are working on Apple machines, so all our instructions are currently macOS / Linux centric. Contributions for Windows development welcome!
16
16
17
-
-[Node.js](https://nodejs.org/)v20.x
17
+
-[Node.js](https://nodejs.org/)v22.x
18
18
-[Yarn CLI](https://yarnpkg.com/getting-started/install) (can be installed with `corepack`, Homebrew, etc)
19
19
- C compiler toolchain (usually installed with `xcode` on Mac)
0 commit comments