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
Note: clean up is necessary since the binary artifacts between versions of compiler may be incompatible.
72
73
74
+
### Using esy in development
75
+
76
+
You can use [esy](https://esy.sh) to develop bucklescript. By default esy will do "out of source builds" which means that all the changes will happen outside the current directory. To be able to bspack the needed files and get sources that you can commit you will have to change the following in the `esy.json`.
77
+
78
+
```diff
79
+
-"buildsInSource": true,
80
+
+"buildsInSource": "unsafe",
81
+
```
82
+
83
+
When that is changed you just run the following command it will build everything you need.
84
+
85
+
esy
86
+
87
+
By default we depend on the 4.02.3+BS OCaml compiler. To be able to build with the 4.06.1+BS compiler we have a `4061.json` file that just extends the `esy.json` and overrides the OCaml dependency. To use this file instead you simply run this command instead.
88
+
89
+
esy @4061
90
+
91
+
If there are problems building try to run one of the following depending on what you're building
92
+
93
+
```
94
+
esy clean
95
+
esy @4061 clean
96
+
```
97
+
73
98
## Test on a Dummy Project
74
99
75
100
Go somewhere else and do this:
@@ -86,7 +111,6 @@ And whenever you modify a file in bucklescript, run this:
86
111
npm install -g .
87
112
```
88
113
89
-
90
114
## Change the Vendored OCaml Compiler
91
115
92
116
This section is reserved for when you're making a change to the vendored ocaml compiler itself, in `ocaml`, and then testing on super-errors changes at the same time. If you're doing this for whatever reason, then the previous quick iteration workflow wouldn't work. Here's what you have to do after each change:
@@ -109,6 +133,7 @@ Currently all tests are in `jscomp/test` directory and you should either add/mod
109
133
110
134
- Add the filename in `jscomp/test/test.mllib`
111
135
- Add a test suite. The specification is in `jscomp/test/mt.ml`. For example some simple tests would be like:
136
+
112
137
```ocaml
113
138
let suites : _ Mt.pair_suites =
114
139
["hey", (fun _ -> Eq(true, 3 > 2));
@@ -216,7 +241,7 @@ Since BuckleScript is distributed under the terms of the [LGPL Version 3](LICENS
216
241
are licensed under the same terms. In order for us to be able to accept your contributions,
217
242
we will need explicit confirmation from you that you are able and willing to provide them under
218
243
these terms, and the mechanism we use to do this is called a Developer's Certificate of Origin
219
-
[DCO](DCO.md). This is very similar to the process used by the Linux(R) kernel, Samba, and many
244
+
[DCO](DCO.md). This is very similar to the process used by the Linux(R) kernel, Samba, and many
220
245
other major open source projects.
221
246
222
247
To participate under these terms, all that you must do is include a line like the following as the
0 commit comments