Skip to content

Commit ea96504

Browse files
cknittclaude
andcommitted
Build reanalyze from its tag instead of installing it with opam
In CI, opam install reanalyze recompiled the whole restored switch (62 packages, about 4 minutes): opam misses the musl system package of the static switch and treats that as a system change. The step now clones the v2.27.0 tag and builds reanalyze with dune in the existing switch (seconds), and passes it to make dead-code with REANALYZE. This also works unchanged once the opam package is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent a10d07d commit ea96504

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,16 @@ jobs:
276276
run: opam exec -- make playground
277277

278278
# Runs after the playground build, whose browser-profile tree it
279-
# analyzes together with the native one.
279+
# analyzes together with the native one. reanalyze is built from its
280+
# release tag in the existing switch: an opam install would recompile
281+
# the restored static switch, whose musl system package opam misses.
280282
- name: Check for dead code
281283
if: matrix.build_playground
284+
shell: bash
282285
run: |
283-
opam pin add --yes --no-action reanalyze git+https://github.com/rescript-lang/reanalyze.git#v2.27.0
284-
opam install --yes reanalyze
285-
opam exec -- make dead-code
286+
git -c advice.detachedHead=false clone --quiet --depth 1 --branch v2.27.0 https://github.com/rescript-lang/reanalyze.git "$RUNNER_TEMP/reanalyze"
287+
(cd "$RUNNER_TEMP/reanalyze" && opam exec -- dune build -p reanalyze @install)
288+
REANALYZE="$RUNNER_TEMP/reanalyze/_build/install/default/bin/reanalyze.exe" opam exec -- make dead-code
286289
287290
- name: Test playground compiler
288291
if: matrix.build_playground

0 commit comments

Comments
 (0)