Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ jobs:
working-directory: ${{ steps.tmp-dir.outputs.path }}

- name: Test installation
run: npx rescript -h && npx rescript-legacy build && cat src/Test.res.js
run: npx rescript -h && npx rescript build && cat src/Test.res.js
shell: bash
working-directory: ${{ steps.tmp-dir.outputs.path }}

Expand Down Expand Up @@ -646,7 +646,7 @@ jobs:
working-directory: ${{ steps.tmp-dir.outputs.path }}

- name: Test installation
run: pnpm rescript -h && pnpm rescript-legacy build && cat src/Test.res.js
run: pnpm rescript -h && pnpm rescript build && cat src/Test.res.js
shell: bash
working-directory: ${{ steps.tmp-dir.outputs.path }}

Expand Down
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"clean": "rescript clean",
"test": "node ./playground_test.cjs",
"build": "rescript clean && rescript-legacy build && node scripts/generate_cmijs.mjs && rollup -c && touch .buildstamp",
"build": "rescript clean && rescript build && node scripts/generate_cmijs.mjs && rollup -c && touch .buildstamp",
"upload-bundle": "node scripts/upload_bundle.mjs",
"serve-bundle": "node serve-bundle.mjs"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/scripts/generate_cmijs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from "./common.mjs";

exec("yarn rescript clean");
exec("yarn rescript-legacy build");
exec("yarn rescript build");

// We need to build the compiler's builtin modules as a separate cmij.
// Otherwise we can't use them for compilation within the playground.
Expand Down
4 changes: 2 additions & 2 deletions scripts/res/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"type": "module",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"build": "rescript build",
"clean": "rescript clean",
"dev": "rescript-legacy -w",
"dev": "rescript watch",
"apidocs:generate": "yarn build && node GenApiDocs.res.js"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tests/analysis_tests/tests-generic-jsx-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@tests/generic-jsx-transform",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"clean": "rescript-legacy clean"
"build": "rescript build",
"clean": "rescript clean"
},
"dependencies": {
"rescript": "workspace:^"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "test-generic-jsx-transform",
"name": "@tests/generic-jsx-transform",
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"compiler-flags": ["-w -33-44-8"],
"compiler-flags": ["-w -33-44-8-26-27-110"],
"package-specs": [{ "module": "commonjs", "in-source": false }],
"jsx": { "module": "GenericJsx" }
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL = /bin/bash

build:
yarn build > /dev/null || true
yarn build > /dev/null 2>&1 || true

test: build
./test.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@tests/incremental-typechecking",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"clean": "rescript-legacy clean"
"build": "rescript build",
"clean": "rescript clean"
},
"dependencies": {
"rescript": "workspace:^"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "test-generic-jsx-transform",
"name": "@tests/incremental-typechecking",
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"compiler-flags": ["-w -33-44-8"],
"compiler-flags": ["-w -33-44-8-26-27-110"],
"jsx": { "module": "GenericJsx" }
}
4 changes: 2 additions & 2 deletions tests/analysis_tests/tests-reanalyze/termination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@tests/reanalyze-termination",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"clean": "rescript-legacy clean"
"build": "rescript build",
"clean": "rescript clean"
},
"dependencies": {
"rescript": "workspace:^"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"suppress": [],
"unsuppress": []
},
"name": "arnold",
"name": "@tests/reanalyze-termination",
"dependencies": [],
"sources": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ module Parser = {
| Asterisk => "*"
| Eof => "Eof"
| Lparen => "("
| Int(n) => string_of_int(n)
| Int(n) => Int.toString(n)
| Plus => "+"
| Rparen => ")"
}
Expand Down Expand Up @@ -256,7 +256,7 @@ module UITermination = {

let counter = (state: state, ~setState: setState) => {
setState(~f=initState)
div(~text=string_of_int(state), ~onClick=() => setState(~f=increment))
div(~text=Int.toString(state), ~onClick=() => setState(~f=increment))
}

@progress(initState)
Expand All @@ -265,7 +265,7 @@ module UITermination = {
| None => ()
| Some(newState) => ignore(counterCompiled(newState))
}
ignore(string_of_int(state))
ignore(Int.toString(state))
}

and onClick1 = state =>
Expand All @@ -276,7 +276,7 @@ module UITermination = {

let countRenders = (state: state, ~setState: setState) => {
setState(~f=increment)
div(~text="I have been rendered " ++ (string_of_int(state) ++ " times"), ~onClick=nothing)
div(~text="I have been rendered " ++ (Int.toString(state) ++ " times"), ~onClick=nothing)
}

@progress(initState)
Expand All @@ -285,7 +285,7 @@ module UITermination = {
| None => ()
| Some(newState) => ignore(countRendersCompiled(newState))
}
ignore("I have been rendered " ++ (string_of_int(state) ++ " times"))
ignore("I have been rendered " ++ (Int.toString(state) ++ " times"))
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/analysis_tests/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@tests/analysis",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"clean": "rescript-legacy clean"
"build": "rescript build",
"clean": "rescript clean"
},
"dependencies": {
"@rescript/react": "link:../../dependencies/rescript-react",
Expand Down
5 changes: 3 additions & 2 deletions tests/analysis_tests/tests/rescript.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "test",
"name": "@tests/analysis",
"reanalyze": {
"analysis": ["dce"]
},
Expand All @@ -9,9 +9,10 @@
"subdirs": true
}
],
"compiler-flags": ["-w -33-44-8"],
"compiler-flags": ["-w -33-44-8-26-27-110"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why this changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not really related, I just wanted to get rid of the warnings in the test output.

"dependencies": ["@rescript/react"],
"jsx": { "version": 4 },
"package-specs": [{ "module": "commonjs", "in-source": false }],
"suffix": ".res.js",
"editor": {
"autocomplete": {
Expand Down
2 changes: 1 addition & 1 deletion tests/docstring_tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"build": "rescript build",
"clean": "rescript clean",
"dev": "rescript -w"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/gentype_tests/stdlib-no-shims/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@tests/gentype-stdlib-no-shims",
"private": true,
"scripts": {
"build": "rescript-legacy build",
"build": "rescript build",
"clean": "rescript clean",
"typecheck": "tsc"
},
Expand Down
4 changes: 2 additions & 2 deletions tests/gentype_tests/typescript-react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@tests/gentype-react-example",
"private": true,
"scripts": {
"start": "rescript-legacy build -w",
"build": "rescript-legacy build",
"start": "rescript build -w",
"build": "rescript build",
"clean": "rescript clean",
"typecheck": "tsc",
"check": "biome check --changed --no-errors-on-unmatched ."
Expand Down
3 changes: 3 additions & 0 deletions tests/package_tests/installation_test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "install-test"
}
2 changes: 1 addition & 1 deletion tests/tools_tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@tests/tools",
"private": true,
"scripts": {
"build": "rescript-legacy build -warn-error -3",
"build": "rescript build",
"clean": "rescript clean",
"dev": "rescript -w"
},
Expand Down
3 changes: 3 additions & 0 deletions tests/tools_tests/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"module": "esmodule",
"in-source": true
},
"warnings": {
"error": "-3"
},
"suffix": ".res.js",
"dependencies": ["@rescript/react"]
}
Loading