Skip to content

Commit 6c237c5

Browse files
committed
Build runtime/stdlib files with rescript/bsb instead of ninja.js
1 parent ac30044 commit 6c237c5

File tree

298 files changed

+276
-1563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+276
-1563
lines changed

.github/workflows/ci.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,13 @@ jobs:
316316
run: opam exec -- make test-syntax
317317

318318
- name: Build runtime/stdlib
319-
if: runner.os != 'Windows'
320-
run: |
321-
opam exec -- node ./scripts/ninja.js config
322-
opam exec -- node ./scripts/ninja.js build
319+
run: ./scripts/buildRuntime.sh
320+
shell: bash
323321

324322
- name: Check for changes in lib folder
325323
run: git diff --exit-code lib/js lib/es6
326324

327-
- name: Populate lib/ocaml
325+
- name: Version Check
328326
run: ./scripts/prebuilt.js
329327

330328
- name: Run tests

Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ reanalyze:
5151
reanalyze.exe -set-exit-code -all-cmt _build/default/jscomp -suppress jscomp/syntax/testrunner -exclude-paths jscomp/outcome_printer,jscomp/ounit_tests,jscomp/ml,jscomp/js_parser,jscomp/frontend,jscomp/ext,jscomp/depends,jscomp/core,jscomp/common,jscomp/cmij,jscomp/bsb_helper,jscomp/bsb
5252

5353
lib: build node_modules/.bin/semver
54-
node scripts/ninja.js config
55-
node scripts/ninja.js build
54+
./scripts/buildRuntime.sh
5655
./scripts/prebuilt.js
5756

5857
artifacts: lib
@@ -86,8 +85,8 @@ clean-rewatch:
8685
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch
8786

8887
clean:
88+
(cd runtime && ../rescript clean)
8989
dune clean
90-
./scripts/ninja.js clean && rm -f ninja/ninja
9190

9291
clean-all: clean clean-gentype clean-rewatch
9392

jscomp/others/release.ninja

-147
This file was deleted.

jscomp/runtime/Readme.md

-3
This file was deleted.

jscomp/runtime/release.ninja

-58
This file was deleted.

lib/es6/array.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

33
import * as List from "./list.js";
4-
import * as Primitive_array from "./primitive_array.js";
5-
import * as Primitive_exceptions from "./primitive_exceptions.js";
4+
import * as Primitive_array from "rescript/lib/es6/primitive_array.js";
5+
import * as Primitive_exceptions from "rescript/lib/es6/primitive_exceptions.js";
66

77
let init = ((length, f) => Array.from({ length }, f));
88

lib/es6/belt_Array.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
4-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
4+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
55

66
function get(arr, i) {
77
if (i >= 0 && i < arr.length) {

lib/es6/belt_HashMap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalBuckets from "./belt_internalBuckets.js";
55
import * as Belt_internalBucketsType from "./belt_internalBucketsType.js";
66

lib/es6/belt_HashMapInt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

3-
import * as Primitive_hash from "./primitive_hash.js";
4-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_hash from "rescript/lib/es6/primitive_hash.js";
4+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
55
import * as Belt_internalBuckets from "./belt_internalBuckets.js";
66
import * as Belt_internalBucketsType from "./belt_internalBucketsType.js";
77

lib/es6/belt_HashMapString.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

3-
import * as Primitive_hash from "./primitive_hash.js";
4-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_hash from "rescript/lib/es6/primitive_hash.js";
4+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
55
import * as Belt_internalBuckets from "./belt_internalBuckets.js";
66
import * as Belt_internalBucketsType from "./belt_internalBucketsType.js";
77

lib/es6/belt_HashSetInt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_hash from "./primitive_hash.js";
3+
import * as Primitive_hash from "rescript/lib/es6/primitive_hash.js";
44
import * as Belt_internalSetBuckets from "./belt_internalSetBuckets.js";
55
import * as Belt_internalBucketsType from "./belt_internalBucketsType.js";
66

lib/es6/belt_HashSetString.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_hash from "./primitive_hash.js";
3+
import * as Primitive_hash from "rescript/lib/es6/primitive_hash.js";
44
import * as Belt_internalSetBuckets from "./belt_internalSetBuckets.js";
55
import * as Belt_internalBucketsType from "./belt_internalBucketsType.js";
66

lib/es6/belt_List.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import * as Belt_Array from "./belt_Array.js";
44
import * as Belt_SortArray from "./belt_SortArray.js";
5-
import * as Primitive_option from "./primitive_option.js";
5+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
66

77
function head(x) {
88
if (x) {

lib/es6/belt_MapDict.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
55

66
function set(t, newK, newD, cmp) {

lib/es6/belt_MapInt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalMapInt from "./belt_internalMapInt.js";
55
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
66

lib/es6/belt_MapString.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
55
import * as Belt_internalMapString from "./belt_internalMapString.js";
66

lib/es6/belt_MutableMap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
55

66
function removeMutateAux(nt, x, cmp) {

lib/es6/belt_MutableMapInt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalMapInt from "./belt_internalMapInt.js";
55
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
66

lib/es6/belt_MutableMapString.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
55
import * as Belt_internalMapString from "./belt_internalMapString.js";
66

lib/es6/belt_MutableQueue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function make() {
66
return {

lib/es6/belt_MutableSet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_SortArray from "./belt_SortArray.js";
55
import * as Belt_internalAVLset from "./belt_internalAVLset.js";
66

lib/es6/belt_MutableSetInt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_SortArrayInt from "./belt_SortArrayInt.js";
55
import * as Belt_internalAVLset from "./belt_internalAVLset.js";
66
import * as Belt_internalSetInt from "./belt_internalSetInt.js";

lib/es6/belt_MutableSetString.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_internalAVLset from "./belt_internalAVLset.js";
55
import * as Belt_SortArrayString from "./belt_SortArrayString.js";
66
import * as Belt_internalSetString from "./belt_internalSetString.js";

lib/es6/belt_MutableStack.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function make() {
66
return {

lib/es6/belt_Option.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function keep(opt, p) {
66
if (opt !== undefined && p(Primitive_option.valFromOption(opt))) {

lib/es6/belt_internalAVLset.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_SortArray from "./belt_SortArray.js";
5-
import * as Primitive_option from "./primitive_option.js";
5+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
66

77
function copy(n) {
88
if (n !== undefined) {

lib/es6/belt_internalAVLtree.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_SortArray from "./belt_SortArray.js";
5-
import * as Primitive_option from "./primitive_option.js";
5+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
66

77
function treeHeight(n) {
88
if (n !== undefined) {

lib/es6/belt_internalBuckets.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

33
import * as Belt_Array from "./belt_Array.js";
4-
import * as Primitive_int from "./primitive_int.js";
5-
import * as Primitive_option from "./primitive_option.js";
4+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
5+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
66

77
function copyAuxCont(_c, _prec) {
88
while (true) {

lib/es6/belt_internalMapInt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

3-
import * as Primitive_int from "./primitive_int.js";
3+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
44
import * as Belt_SortArray from "./belt_SortArray.js";
5-
import * as Primitive_option from "./primitive_option.js";
5+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
66
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
77

88
function add(t, x, data) {

lib/es6/belt_internalMapString.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

33
import * as Belt_SortArray from "./belt_SortArray.js";
4-
import * as Primitive_option from "./primitive_option.js";
5-
import * as Primitive_string from "./primitive_string.js";
4+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
5+
import * as Primitive_string from "rescript/lib/es6/primitive_string.js";
66
import * as Belt_internalAVLtree from "./belt_internalAVLtree.js";
77

88
function add(t, x, data) {

lib/es6/belt_internalSetBuckets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
import * as Belt_Array from "./belt_Array.js";
4-
import * as Primitive_int from "./primitive_int.js";
4+
import * as Primitive_int from "rescript/lib/es6/primitive_int.js";
55

66
function copyBucket(c) {
77
if (c === undefined) {

lib/es6/dom_storage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function getItem(s, obj) {
66
return Primitive_option.fromNull(obj.getItem(s));

lib/es6/hashtbl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_hash from "./primitive_hash.js";
3+
import * as Primitive_hash from "rescript/lib/es6/primitive_hash.js";
44

55
function hash(x) {
66
return Primitive_hash.hash(10, 100, 0, x);

lib/es6/js_array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function copyWithin(to_, obj) {
66
return obj.copyWithin(to_);

lib/es6/js_dict.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function get(dict, k) {
66
if ((k in dict)) {

lib/es6/js_exn.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
let $$Error = "JsError";
66

lib/es6/js_null.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function test(x) {
66
return x === null;

lib/es6/js_null_undefined.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Primitive_option from "./primitive_option.js";
3+
import * as Primitive_option from "rescript/lib/es6/primitive_option.js";
44

55
function bind(x, f) {
66
if (x == null) {

0 commit comments

Comments
 (0)