Skip to content

Make rewatch the default build system / cli #7593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename runtime build scripts
  • Loading branch information
cknitt committed Jul 4, 2025
commit 4adf7a7360bdef5504d4acb87a4ff7f3d0d2c03a
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ jobs:

- name: Build runtime/stdlib with rewatch
if: ${{ runner.os != 'Windows' }}
run: ./scripts/buildRuntimeRewatch.sh
run: ./scripts/buildRuntime.sh
shell: bash

- name: Build runtime/stdlib with bsb (Windows)
if: ${{ runner.os == 'Windows' }}
run: ./scripts/buildRuntime.sh
run: ./scripts/buildRuntimeLegacy.sh
shell: bash

- name: Check for changes in lib folder
Expand Down Expand Up @@ -510,7 +510,7 @@ jobs:
- name: Build website
if: steps.diffcheck.outputs.clean == 'false'
run: |
npm ci
npm ci
npm run build

- name: Commit and push
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ reanalyze:
reanalyze.exe -set-exit-code -all-cmt _build/default/compiler _build/default/tests -exclude-paths compiler/outcome_printer,compiler/ml,compiler/frontend,compiler/ext,compiler/depends,compiler/core,compiler/common,compiler/cmij,compiler/bsb_helper,compiler/bsb

lib-bsb:
./scripts/buildRuntime.sh
./scripts/buildRuntimeLegacy.sh

lib:
./scripts/buildRuntimeRewatch.sh
./scripts/buildRuntime.sh

artifacts: lib
./scripts/npmPack.js --updateArtifactList
Expand Down
5 changes: 4 additions & 1 deletion scripts/buildRuntime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
shopt -s extglob

(cd runtime && ../cli/rescript-legacy.js clean && ../cli/rescript-legacy.js build)
(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build)

rm -f lib/es6/*.js lib/js/*.js lib/ocaml/*
mkdir -p lib/es6 lib/js lib/ocaml
Expand All @@ -11,3 +11,6 @@ cp runtime/lib/es6/*.js lib/es6
cp runtime/lib/js/*.js lib/js
cp runtime/lib/bs/*.@(cmi|cmj|cmt|cmti) lib/ocaml/
cp runtime/*.@(res|resi) lib/ocaml/
# overwrite the stdlib build artifacts to the testrepo
mkdir -p rewatch/testrepo/node_modules/rescript/lib/ocaml
cp -rf lib/ocaml rewatch/testrepo/node_modules/rescript/lib/ocaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
shopt -s extglob

(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build)
(cd runtime && ../cli/rescript-legacy.js clean && ../cli/rescript-legacy.js build)

rm -f lib/es6/*.js lib/js/*.js lib/ocaml/*
mkdir -p lib/es6 lib/js lib/ocaml
Expand All @@ -11,6 +11,3 @@ cp runtime/lib/es6/*.js lib/es6
cp runtime/lib/js/*.js lib/js
cp runtime/lib/bs/*.@(cmi|cmj|cmt|cmti) lib/ocaml/
cp runtime/*.@(res|resi) lib/ocaml/
# overwrite the stdlib build artifacts to the testrepo
mkdir -p rewatch/testrepo/node_modules/rescript/lib/ocaml
cp -rf lib/ocaml rewatch/testrepo/node_modules/rescript/lib/ocaml
Loading