Skip to content

Commit 10e4171

Browse files
Refresh watcher recovery fix and preserve upstream watch tests
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
2 parents 3e45f81 + 9d51a64 commit 10e4171

1,053 files changed

Lines changed: 13814 additions & 24493 deletions

File tree

Some content is hidden

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

‎.devcontainer/.dockerignore‎

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

‎.devcontainer/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ RUN printf '\n\n' | bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/o
1717
USER vscode
1818
ENV HOME=/home/vscode
1919

20-
RUN opam init -y --shell-setup --enable-shell-hook --compiler=5.5.0 --disable-sandboxing
20+
RUN opam init -y --shell-setup --enable-shell-hook --compiler=5.5.1 --disable-sandboxing

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
*.resi linguist-language=ReScript
77

88
.yarn/releases/* binary linguist-vendored
9+
tests/dependencies/** linguist-vendored

‎.github/actions/build-rewatch/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
uses: actions/cache@v6
2727
with:
2828
path: rewatch/target
29-
key: rewatch-build-v4-${{ inputs.cache-target }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.toml', 'rewatch/Cargo.lock', 'rewatch/rust-toolchain.toml', 'rewatch/.cargo/config.toml') }}
29+
key: rewatch-build-v4-${{ inputs.cache-target }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.toml', 'rewatch/Cargo.lock') }}
3030

3131
- name: Determine Rust toolchain version
3232
id: rust-version

‎.github/actions/setup-ocaml/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ runs:
8282
run: |
8383
dependency_flags_key="${DEPENDENCY_FLAGS//--/}"
8484
dependency_flags_key="${dependency_flags_key// /_}"
85-
key="$CACHE_PREFIX-$OS-3.8.0-$COMPILER-$dependency_flags_key-${{ hashFiles('*.opam') }}"
85+
key="$CACHE_PREFIX-$OS-3.9.0-$COMPILER-$dependency_flags_key-${{ hashFiles('*.opam') }}"
8686
echo "value=${key//,/-}" >> "$GITHUB_OUTPUT"
87-
echo "setup-version=3.8.0" >> "$GITHUB_OUTPUT"
87+
echo "setup-version=3.9.0" >> "$GITHUB_OUTPUT"
8888
8989
- name: Restore OPAM environment
9090
id: cache
@@ -101,7 +101,7 @@ runs:
101101

102102
- name: Use OCaml ${{ inputs.compiler }}
103103
if: steps.cache.outputs.cache-hit != 'true'
104-
uses: ocaml/setup-ocaml@v3.8.0
104+
uses: ocaml/setup-ocaml@v3.9.0
105105
with:
106106
ocaml-compiler: ${{ inputs.compiler }}
107107
opam-pin: false

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
matrix:
3838
include:
3939
- os: ubuntu-24.04 # x64
40-
ocaml_compiler: ocaml-variants.5.5.0+options,ocaml-option-static
40+
ocaml_compiler: ocaml-variants.5.5.1+options,ocaml-option-static
4141
upload_binaries: true
4242
upload_libs: true
4343
node-target: linux-x64
4444
rust-target: x86_64-unknown-linux-musl
4545
dune-profile: static
4646
- os: ubuntu-24.04-arm # ARM
47-
ocaml_compiler: ocaml-variants.5.5.0+options,ocaml-option-static
47+
ocaml_compiler: ocaml-variants.5.5.1+options,ocaml-option-static
4848
upload_binaries: true
4949
# Build the playground compiler and run the benchmarks on the fastest runner
5050
build_playground: true
@@ -54,19 +54,19 @@ jobs:
5454
rust-target: aarch64-unknown-linux-musl
5555
dune-profile: static
5656
- os: macos-15-intel # x64
57-
ocaml_compiler: 5.5.0
57+
ocaml_compiler: 5.5.1
5858
upload_binaries: true
5959
node-target: darwin-x64
6060
rust-target: x86_64-apple-darwin
6161
dune-profile: release
6262
- os: macos-15 # ARM
63-
ocaml_compiler: 5.5.0
63+
ocaml_compiler: 5.5.1
6464
upload_binaries: true
6565
node-target: darwin-arm64
6666
rust-target: aarch64-apple-darwin
6767
dune-profile: release
6868
- os: windows-2025
69-
ocaml_compiler: 5.5.0
69+
ocaml_compiler: 5.5.1
7070
upload_binaries: true
7171
node-target: win32-x64
7272
rust-target: x86_64-pc-windows-gnu
@@ -117,7 +117,7 @@ jobs:
117117
with:
118118
compiler: ${{ matrix.ocaml_compiler }}
119119
os: ${{ matrix.os }}
120-
cache-prefix: opam-env-v8
120+
cache-prefix: opam-env-v9
121121

122122
- name: Compiler build state key
123123
id: compiler-build-state-key
@@ -486,7 +486,7 @@ jobs:
486486
uses: actions/setup-node@v7
487487
with:
488488
# Run integration tests with the oldest supported node version.
489-
node-version: 20
489+
node-version: 22
490490

491491
- name: Make test directory
492492
id: tmp-dir
@@ -526,6 +526,11 @@ jobs:
526526
shell: bash
527527
working-directory: ${{ steps.tmp-dir.outputs.path }}
528528

529+
- name: Test packaged CLI subcommands and watch shutdown
530+
run: node packaged-cli-smoke.mjs
531+
shell: bash
532+
working-directory: ${{ steps.tmp-dir.outputs.path }}
533+
529534
test-installation-pnpm:
530535
needs:
531536
- pkg-pr-new
@@ -592,37 +597,3 @@ jobs:
592597
node src/BeltTest.mjs
593598
shell: bash
594599
working-directory: ${{ steps.tmp-dir.outputs.path }}
595-
596-
test-integration-rewatch:
597-
needs:
598-
- pkg-pr-new
599-
strategy:
600-
fail-fast: false
601-
matrix:
602-
include:
603-
- os: macos-15-intel
604-
- os: macos-15
605-
- os: ubuntu-24.04
606-
- os: ubuntu-24.04-arm
607-
- os: windows-2025
608-
runs-on: ${{ matrix.os }}
609-
steps:
610-
- name: Checkout
611-
uses: actions/checkout@v7
612-
613-
- name: Use Node.js
614-
uses: actions/setup-node@v7
615-
with:
616-
# Run integration tests with the oldest supported node version.
617-
node-version: 20
618-
619-
- name: Install ReScript package in rewatch/testrepo
620-
run: |
621-
COMMIT_SHA="${{ needs.pkg-pr-new.outputs.commit_sha }}"
622-
yarn add "rescript@https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA}"
623-
shell: bash
624-
working-directory: rewatch/testrepo
625-
626-
- name: Run rewatch integration tests
627-
run: ./rewatch/tests/suite.sh rewatch/testrepo/node_modules/.bin/rescript
628-
shell: bash

‎.github/workflows/coverage.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id-token: write # For CodeCov OIDC
2222
env:
2323
OS: ubuntu-24.04-arm
24-
OCAML_COMPILER: 5.5.0
24+
OCAML_COMPILER: 5.5.1
2525
RUST_TARGET: aarch64-unknown-linux-gnu
2626
steps:
2727
- name: Checkout
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
compiler: ${{ env.OCAML_COMPILER }}
4646
os: ${{ env.OS }}
47-
cache-prefix: opam-coverage-v1
47+
cache-prefix: opam-coverage-v2
4848
dependency-flags: --deps-only --with-test --with-dev-setup
4949

5050
- name: Install OCaml coverage tooling

‎.github/workflows/publish.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v7
25-
with:
26-
fetch-depth: 0
2725

2826
- name: Setup Node and dependencies
2927
uses: ./.github/actions/setup-node
@@ -51,7 +49,11 @@ jobs:
5149
env:
5250
GIT_TAG: v${{ steps.plan.outputs.version }}
5351
run: |
54-
existing_commit="$(git rev-list -n 1 "$GIT_TAG" 2>/dev/null || true)"
52+
tag_ref="refs/tags/$GIT_TAG"
53+
existing_commit="$(git ls-remote origin "$tag_ref^{}" | cut -f1)"
54+
if [[ -z "$existing_commit" ]]; then
55+
existing_commit="$(git ls-remote origin "$tag_ref" | cut -f1)"
56+
fi
5557
if [[ -n "$existing_commit" && "$existing_commit" != "$GITHUB_SHA" ]]; then
5658
echo "$GIT_TAG already points to $existing_commit, not $GITHUB_SHA." >&2
5759
exit 1
@@ -79,16 +81,18 @@ jobs:
7981
steps:
8082
- name: Checkout
8183
uses: actions/checkout@v7
82-
with:
83-
fetch-depth: 0
8484

8585
- name: Create Git tag
8686
env:
8787
GIT_TAG: v${{ needs.release-plan.outputs.version }}
8888
GIT_USER_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
8989
GIT_USER_NAME: ${{ github.actor }}
9090
run: |
91-
existing_commit="$(git rev-list -n 1 "$GIT_TAG" 2>/dev/null || true)"
91+
tag_ref="refs/tags/$GIT_TAG"
92+
existing_commit="$(git ls-remote origin "$tag_ref^{}" | cut -f1)"
93+
if [[ -z "$existing_commit" ]]; then
94+
existing_commit="$(git ls-remote origin "$tag_ref" | cut -f1)"
95+
fi
9296
if [[ -z "$existing_commit" ]]; then
9397
git \
9498
-c user.name="$GIT_USER_NAME" \

‎.gitignore‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ _build_playground
4646

4747
node_modules
4848
*.dump
49-
coverage
5049
_coverage/
5150
bisect*.coverage
5251

@@ -58,20 +57,13 @@ tests/build_tests/*/lib/
5857
*.so
5958
tmp/
6059
tracing*.json
61-
.nyc_output
6260
.vscode/launch.json
6361
.vscode/settings.json
6462

6563
# opam local switch is stored in `_opam` folder
6664
_opam
6765

6866
.env
69-
playground/packages/
70-
playground/stdlib/
71-
playground/*.cmj
72-
playground/*.cmi
73-
playground/.netrc
74-
playground/compiler.*js
7567
packages/dev-playground/dist/
7668
packages/dev-playground/pages-site/
7769
packages/dev-playground/lib/
@@ -87,12 +79,6 @@ tests/tools_tests/lib
8779
tests/analysis_tests*/lib
8880
tests/analysis_tests/**/*.bs.js
8981

90-
/linux/*.exe
91-
/linuxarm64/*.exe
92-
/darwin/*.exe
93-
/darwinarm64/*.exe
94-
/win32/*.exe
95-
9682
.yarn/*
9783
!.yarn/patches
9884
!.yarn/plugins

0 commit comments

Comments
 (0)