Skip to content

Commit

Permalink
Build runtime/stdlib files with rescript/bsb instead of ninja.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Oct 2, 2024
1 parent e8489bb commit 4d6454b
Show file tree
Hide file tree
Showing 212 changed files with 49 additions and 1,580 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,13 @@ jobs:
run: opam exec -- make test-syntax

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

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

- name: Populate lib/ocaml
- name: Version Check
run: ./scripts/prebuilt.js

- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#### :house: Internal

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

# 12.0.0-alpha.3

Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ reanalyze:
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

lib: build node_modules/.bin/semver
node scripts/ninja.js config
node scripts/ninja.js build
./scripts/buildRuntime.sh
./scripts/prebuilt.js

artifacts: lib
Expand Down Expand Up @@ -86,8 +85,8 @@ clean-rewatch:
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch

clean:
(cd runtime && ../rescript clean)
dune clean
./scripts/ninja.js clean && rm -f ninja/ninja

clean-all: clean clean-gentype clean-rewatch

Expand Down
54 changes: 0 additions & 54 deletions jscomp/others/Design.md

This file was deleted.

32 changes: 0 additions & 32 deletions jscomp/others/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions jscomp/others/intro.txt

This file was deleted.

147 changes: 0 additions & 147 deletions jscomp/others/release.ninja

This file was deleted.

3 changes: 0 additions & 3 deletions jscomp/runtime/Readme.md

This file was deleted.

58 changes: 0 additions & 58 deletions jscomp/runtime/release.ninja

This file was deleted.

1 change: 1 addition & 0 deletions runtime/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +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.
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.
5 changes: 5 additions & 0 deletions runtime/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "rescript-runtime",
"version": "0.0.0",
"private": true
}
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.
22 changes: 22 additions & 0 deletions runtime/rescript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "rescript-runtime",
"sources": [
{
"dir": "."
}
],
"bsc-flags": [
"-make-runtime",
"-nostdlib",
"-nopervasives",
"-open Pervasives",
"-no-keep-locs",
"-no-alias-deps",
"-bs-no-version-header",
"-bs-no-check-div-by-zero",
"-bs-cross-module-opt",
"-unsafe",
"-w -3+50",
"-warn-error A"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions scripts/buildRuntime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
shopt -s extglob

rm -f lib/es6/*.js lib/js/*.js lib/ocaml/*
mkdir -p lib/es6 lib/js lib/ocaml
mkdir -p runtime/lib/es6 runtime/lib/js

(cd runtime && ../rescript build)

cp runtime/lib/es6/*.js lib/es6
cp runtime/lib/js/*.js lib/js
cp runtime/lib/bs/!(belt_internal*).cmi lib/ocaml/
cp runtime/lib/bs/*.@(cmj|cmt|cmti) lib/ocaml/
cp runtime/*.@(res|resi) lib/ocaml/
Loading

0 comments on commit 4d6454b

Please sign in to comment.