Skip to content

Commit 3ad380b

Browse files
authored
Merge branch 'rescript-lang:master' into unified-operator/lxor
2 parents 05ecf8e + 2470f75 commit 3ad380b

File tree

849 files changed

+21485
-12754
lines changed

Some content is hidden

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

849 files changed

+21485
-12754
lines changed

.devcontainer/postCreate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Install dev dependencies from OPAM
44
opam init -y --bare --disable-sandboxing
5-
opam switch create 5.2.1 --packages ocaml-option-static
5+
opam switch create 5.3.0 --packages ocaml-option-static
66
opam install . --deps-only -y
77

88
# For IDE support, install the OCaml language server

.github/workflows/ci.yml

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
rust-target: x86_64-apple-darwin
3030
- os: macos-14 # ARM
3131
rust-target: aarch64-apple-darwin
32-
- os: ubuntu-latest # x64
32+
- os: ubuntu-24.04 # x64
3333
rust-target: x86_64-unknown-linux-musl
34-
- os: buildjet-2vcpu-ubuntu-2204-arm # ARM
34+
- os: ubuntu-24.04-arm # ARM
3535
rust-target: aarch64-unknown-linux-musl
3636
- os: windows-latest
3737
rust-target: x86_64-pc-windows-gnu
@@ -86,33 +86,33 @@ jobs:
8686
fail-fast: false
8787
matrix:
8888
include:
89-
- os: ubuntu-latest # x64
90-
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
89+
- os: ubuntu-24.04 # x64
90+
ocaml_compiler: ocaml-variants.5.3.0+options,ocaml-option-static
9191
upload_binaries: true
9292
upload_libs: true
93+
- os: ubuntu-24.04-arm # ARM
94+
ocaml_compiler: ocaml-variants.5.3.0+options,ocaml-option-static
95+
upload_binaries: true
9396
# Build the playground compiler and run the benchmarks on the fastest runner
9497
build_playground: true
9598
benchmarks: true
96-
- os: buildjet-2vcpu-ubuntu-2204-arm # ARM
97-
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
98-
upload_binaries: true
9999
- os: macos-13 # x64
100-
ocaml_compiler: 5.2.1
100+
ocaml_compiler: 5.3.0
101101
upload_binaries: true
102102
- os: macos-14 # ARM
103-
ocaml_compiler: 5.2.1
103+
ocaml_compiler: 5.3.0
104104
upload_binaries: true
105105
- os: windows-latest
106-
ocaml_compiler: 5.2.1
106+
ocaml_compiler: 5.3.0
107107
upload_binaries: true
108108

109109
# Verify that the compiler still builds with older OCaml versions
110-
- os: ubuntu-latest
110+
- os: ubuntu-24.04
111+
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
112+
- os: ubuntu-24.04
111113
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
112-
- os: ubuntu-latest
114+
- os: ubuntu-24.04
113115
ocaml_compiler: ocaml-variants.4.14.2+options,ocaml-option-static
114-
- os: ubuntu-latest
115-
ocaml_compiler: ocaml-variants.4.13.0+options,ocaml-option-static
116116

117117
runs-on: ${{matrix.os}}
118118

@@ -135,23 +135,23 @@ jobs:
135135
- name: Use Node.js
136136
uses: actions/setup-node@v4
137137
with:
138-
node-version: 18
138+
node-version-file: .nvmrc
139139

140140
- name: Get artifact dir name
141141
run: node .github/workflows/get_artifact_dir_name.js
142142

143143
- name: Install dependencies (Linux)
144144
if: runner.os == 'Linux'
145-
uses: awalsh128/[email protected].2
145+
uses: awalsh128/[email protected].3
146146
with:
147147
# See https://github.com/ocaml/setup-ocaml/blob/b2105f9/packages/setup-ocaml/src/unix.ts#L9
148148
packages: bubblewrap darcs g++-multilib gcc-multilib mercurial musl-tools rsync
149-
version: v2
149+
version: v3
150150

151151
# matrix.ocaml_compiler may contain commas
152152
- name: Get OPAM cache key
153153
shell: bash
154-
run: echo "opam_cache_key=opam-env-v6-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV
154+
run: echo "opam_cache_key=opam-env-v7-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV
155155

156156
- name: Restore OPAM environment
157157
id: cache-opam-env
@@ -167,7 +167,7 @@ jobs:
167167
key: ${{ env.opam_cache_key }}
168168

169169
- name: Use OCaml ${{matrix.ocaml_compiler}}
170-
uses: ocaml/setup-ocaml@v3.1.4
170+
uses: ocaml/setup-ocaml@v3.2.5
171171
if: steps.cache-opam-env.outputs.cache-hit != 'true'
172172
with:
173173
ocaml-compiler: ${{matrix.ocaml_compiler}}
@@ -244,11 +244,6 @@ jobs:
244244
fi
245245
shell: bash
246246

247-
# see https://github.com/ocaml/setup-ocaml/issues/815
248-
- name: "Windows: set SHELLOPTS=igncr"
249-
if: runner.os == 'Windows'
250-
run: echo "SHELLOPTS=igncr" >>"$GITHUB_ENV"
251-
252247
- name: Build compiler
253248
if: runner.os != 'Linux'
254249
run: opam exec -- dune build --display quiet --profile release
@@ -274,7 +269,7 @@ jobs:
274269
if: steps.ninja-build-cache.outputs.cache-hit != 'true'
275270
uses: actions/setup-python@v5
276271
with:
277-
python-version: '3.10'
272+
python-version: "3.10"
278273

279274
- name: Setup MSVC for ninja build (Windows)
280275
if: steps.ninja-build-cache.outputs.cache-hit != 'true' && runner.os == 'Windows'
@@ -321,7 +316,7 @@ jobs:
321316
run: git diff --ignore-cr-at-eol --exit-code tests
322317

323318
- name: Run analysis / tools tests
324-
if: runner.os != 'Windows' && matrix.os != 'buildjet-2vcpu-ubuntu-2204-arm'
319+
if: runner.os != 'Windows' && runner.os != 'Linux'
325320
run: opam exec -- make -C tests/analysis_tests test && make -C tests/tools_tests test
326321

327322
- name: Run gentype tests
@@ -338,7 +333,7 @@ jobs:
338333
with:
339334
path: ./tests/benchmark-cache
340335
key: syntax-benchmark-v1
341-
336+
342337
- name: Create new benchmark data and comment on alert
343338
# Do not run for PRs created from other repos as those won't be able to write to the pull request
344339
if: ${{ matrix.benchmarks && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name) }}
@@ -359,7 +354,7 @@ jobs:
359354
with:
360355
path: ./tests/benchmark-cache
361356
key: syntax-benchmark-v1
362-
357+
363358
- name: Build playground compiler
364359
if: matrix.build_playground
365360
run: |
@@ -396,8 +391,8 @@ jobs:
396391
needs:
397392
- build-compiler
398393
- build-rewatch
399-
400-
runs-on: ubuntu-latest
394+
395+
runs-on: ubuntu-24.04
401396

402397
steps:
403398
- name: Checkout
@@ -406,7 +401,7 @@ jobs:
406401
- name: Use Node.js
407402
uses: actions/setup-node@v4
408403
with:
409-
node-version: 18
404+
node-version-file: .nvmrc
410405

411406
- name: NPM install
412407
run: npm ci --ignore-scripts
@@ -452,8 +447,8 @@ jobs:
452447
os: [
453448
macos-13, # x64
454449
macos-14, # ARM
455-
ubuntu-latest,
456-
buildjet-2vcpu-ubuntu-2204-arm,
450+
ubuntu-24.04,
451+
ubuntu-24.04-arm,
457452
windows-latest,
458453
]
459454

@@ -466,7 +461,7 @@ jobs:
466461
- name: Use Node.js
467462
uses: actions/setup-node@v4
468463
with:
469-
node-version: 18
464+
node-version-file: .nvmrc
470465

471466
- name: Download artifacts
472467
uses: actions/download-artifact@v4
@@ -491,7 +486,7 @@ jobs:
491486

492487
if: startsWith(github.ref, 'refs/tags/v')
493488

494-
runs-on: ubuntu-latest
489+
runs-on: ubuntu-24.04
495490

496491
steps:
497492
- name: Checkout
@@ -500,7 +495,7 @@ jobs:
500495
- name: Use Node.js
501496
uses: actions/setup-node@v4
502497
with:
503-
node-version: 18
498+
node-version-file: .nvmrc
504499
registry-url: https://registry.npmjs.org # Needed to make auth work for publishing
505500

506501
- name: Download artifacts

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.ocamlformat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
profile = default
2-
version = 0.26.2
2+
version = 0.27.0
33

44
field-space = tight-decl
55
break-cases = toplevel
@@ -9,3 +9,4 @@ space-around-arrays = false
99
space-around-lists = false
1010
space-around-records = false
1111
space-around-variants = false
12+
parse-docstrings = false

.ocamlformat-ignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
compiler/js_parser/**
22
compiler/ml/cmt_format.ml
3-
compiler/ml/pprintast.ml
43
compiler/core/js_name_of_module_id.ml
54
compiler/core/js_pass_debug.ml
65
compiler/core/lam_util.ml

0 commit comments

Comments
 (0)