Skip to content

Commit d5339a2

Browse files
authored
Build runtime/stdlib files with rescript/bsb instead of ninja.js (#7063)
* -make-runtime hack * Build runtime/stdlib files with rescript/bsb instead of ninja.js * Fix cppo
1 parent beb79ef commit d5339a2

File tree

214 files changed

+65
-1601
lines changed

Some content is hidden

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

214 files changed

+65
-1601
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#### :house: Internal
4343

4444
- Remove uncurried flag from bsb. https://github.com/rescript-lang/rescript-compiler/pull/7049
45+
- Build runtime/stdlib files with rescript/bsb instead of ninja.js. https://github.com/rescript-lang/rescript-compiler/pull/7063
4546

4647
# 12.0.0-alpha.3
4748

Makefile

Lines changed: 2 additions & 3 deletions
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/core/js_packages_state.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

2525
let packages_info = ref Js_packages_info.empty
26+
let make_runtime = ref false
2627

2728
let set_package_name name =
2829
if Js_packages_info.is_empty !packages_info then
2930
packages_info := Js_packages_info.from_name name
30-
else Bsc_args.bad_arg "duplicated flag for -bs-package-name"
31+
else if not !make_runtime then Bsc_args.bad_arg "duplicated flag for -bs-package-name"
3132

3233
let make_runtime () : unit =
34+
make_runtime := true;
3335
packages_info := Js_packages_info.runtime_package_specs
3436

3537
let make_runtime_test () : unit =

jscomp/others/Design.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

jscomp/others/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

jscomp/others/intro.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)