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
{{ message }}
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This will produce the final binary `lib/rescript.exe`used for testing.
40
+
This will produce the three binaries `rescript`, `tests` and `bench` (with `.exe`extension on Windows).
38
41
39
-
We only build production binary, even in dev mode. No need for a separate dev binary when the build is fast enough. Plus, this encourages proper benchmarking of the (production) binary each diff.
42
+
We only build production binaries, even in dev mode. No need for a separate dev binary when the build is fast enough. Plus, this encourages proper benchmarking of the (production) binary each diff.
40
43
41
44
After you make a change:
45
+
42
46
```sh
43
47
make
44
48
```
45
49
46
50
Run the core tests:
51
+
47
52
```sh
48
53
make test
49
54
```
50
55
51
56
Run the extended tests:
57
+
52
58
```sh
53
59
make roundtrip-test
54
60
```
55
61
56
62
Those will tell you whether you've got a test output difference. If it's intentional, check them in.
dune exec -- rescript -print ml test.res # show ocaml code
71
+
dune exec -- rescript -print res -width 80 test.res # test printer and change default print width
65
72
```
66
73
67
74
Benchmark:
75
+
68
76
```sh
69
77
make bench
70
78
```
71
79
72
80
Enable stack trace:
81
+
73
82
```sh
74
83
# Before you run the binary
75
84
export OCAMLRUNPARAM="b"
@@ -79,7 +88,10 @@ This is likely a known knowledge: add the above line into your shell rc file so
79
88
80
89
### Development Docs
81
90
82
-
`src/syntax` contains all the source code. Don't change folder structure without notice; ReScript uses this repo as a submodule and assumes `src/syntax`.
91
+
#### Folder Structure
92
+
93
+
-`src` contains all the parser/printer source code. Don't change folder structure without notice; The [rescript-compiler](https://github.com/rescript-lang/rescript-compiler) repo uses this repo as a submodule and assumes `src`.
94
+
-`benchmarks`, `cli` and `tests` contain the source code for the executables used for testing/benchmarking. These are not used by the [rescript-compiler](https://github.com/rescript-lang/rescript-compiler) repo.
83
95
84
96
#### Error Reporting Logic
85
97
@@ -97,8 +109,8 @@ Right now, ReScript's compiler's error reporting mechanism, for architectural re
0 commit comments