Skip to content

Commit 4d6454b

Browse files
committed
Build runtime/stdlib files with rescript/bsb instead of ninja.js
1 parent e8489bb commit 4d6454b

File tree

212 files changed

+49
-1580
lines changed

Some content is hidden

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

212 files changed

+49
-1580
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

CHANGELOG.md

+1

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/Design.md

-54
This file was deleted.

jscomp/others/README.md

-32
This file was deleted.

jscomp/others/intro.txt

-37
This file was deleted.

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.

runtime/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

runtime/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "rescript-runtime",
3+
"version": "0.0.0",
4+
"private": true
5+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

runtime/rescript.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "rescript-runtime",
3+
"sources": [
4+
{
5+
"dir": "."
6+
}
7+
],
8+
"bsc-flags": [
9+
"-make-runtime",
10+
"-nostdlib",
11+
"-nopervasives",
12+
"-open Pervasives",
13+
"-no-keep-locs",
14+
"-no-alias-deps",
15+
"-bs-no-version-header",
16+
"-bs-no-check-div-by-zero",
17+
"-bs-cross-module-opt",
18+
"-unsafe",
19+
"-w -3+50",
20+
"-warn-error A"
21+
]
22+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/buildRuntime.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -e
3+
shopt -s extglob
4+
5+
rm -f lib/es6/*.js lib/js/*.js lib/ocaml/*
6+
mkdir -p lib/es6 lib/js lib/ocaml
7+
mkdir -p runtime/lib/es6 runtime/lib/js
8+
9+
(cd runtime && ../rescript build)
10+
11+
cp runtime/lib/es6/*.js lib/es6
12+
cp runtime/lib/js/*.js lib/js
13+
cp runtime/lib/bs/!(belt_internal*).cmi lib/ocaml/
14+
cp runtime/lib/bs/*.@(cmj|cmt|cmti) lib/ocaml/
15+
cp runtime/*.@(res|resi) lib/ocaml/

0 commit comments

Comments
 (0)