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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ jobs:
if: matrix.build_playground
run: opam exec -- make playground

# Runs after the playground build, whose browser-profile tree it
# analyzes together with the native one. reanalyze is a test
# dependency, installed with the switch.
- name: Check for dead code
if: matrix.build_playground
run: opam exec -- make dead-code

- name: Test playground compiler
if: matrix.build_playground
run: yarn workspace playground test
Expand Down
1 change: 1 addition & 0 deletions changes/dead-code-ci.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Check in CI that reanalyze reports no dead code in the OCaml sources.
8 changes: 7 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@
(and
(<> :os "win32")
:with-test
(= 6.5.0)))))
(= 6.5.0)))
; make dead-code
(reanalyze
(and
(<> :os "win32")
:with-test
(= 2.27.0)))))

(package
(name analysis)
Expand Down
1 change: 1 addition & 0 deletions rescript.opam
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ depends: [
"ocaml-lsp-server" {with-dev-setup & >= "1.23.0"}
"js_of_ocaml" {os != "win32" & with-test & = "6.5.0"}
"wasm_of_ocaml-compiler" {os != "win32" & with-test & = "6.5.0"}
"reanalyze" {os != "win32" & with-test & = "2.27.0"}
]
build: [
["dune" "subst"] {dev}
Expand Down
4 changes: 2 additions & 2 deletions scripts/dead_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# anything.
#
# Usage: REANALYZE=/path/to/reanalyze.exe ./scripts/dead_code.sh
# (defaults to reanalyze.exe on PATH; needs a reanalyze that analyzes several
# build trees together, rescript-lang/reanalyze#224)
# (defaults to reanalyze.exe on PATH. reanalyze is a test dependency in
# rescript.opam, installed by opam install . --deps-only --with-test.)

set -euo pipefail
cd "$(dirname "$0")/.."
Expand Down
Loading