plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


e337eab — Peter John 2026-11-10T23:12:38+05:30
test-all: the tree-sitter step compiles the parser into the run's own folder, and a skip is named in the last line
Files changed (1) hide show
  1. compiler/scripts/test-all.sh +7 -3
compiler/scripts/test-all.sh CHANGED
@@ -90,8 +90,11 @@ done
90
90
 
91
91
  # The grammar's corpus (test/corpus) and highlight assertions (test/highlight), when the
92
92
  # tree-sitter CLI is installed (`brew install tree-sitter-cli` or `npm i -g tree-sitter-cli`).
93
+ # The parser is compiled into a folder of this run's own: the CLI's default cache is shared
94
+ # by every checkout, so a run could test another worktree's grammar.
95
+ skipped=""
93
96
  if command -v tree-sitter > /dev/null; then
94
- if ts=$(cd compiler/tooling/tree-sitter-plum && tree-sitter test 2>&1); then
97
+ if ts=$(cd compiler/tooling/tree-sitter-plum && TREE_SITTER_LIBDIR="$tmp/tree-sitter-lib" tree-sitter test 2>&1); then
95
98
  echo "ok tree-sitter corpus and highlights"
96
99
  else
97
100
  echo "FAIL tree-sitter corpus and highlights"
@@ -100,8 +103,9 @@ if command -v tree-sitter > /dev/null; then
100
103
  $(echo "$ts" | grep -E '✗|Failure|failed parses' | head -40)"
101
104
  fi
102
105
  else
106
+ echo "SKIP tree-sitter corpus and highlights: no tree-sitter CLI (brew install tree-sitter-cli)"
103
- echo "skip tree-sitter corpus and highlights (no tree-sitter CLI)"
107
+ skipped=" (skipped: tree-sitter corpus and highlights, no tree-sitter CLI)"
104
108
  fi
105
109
 
106
110
  [ -n "$(echo "$failed_names" | tr -d '[:space:]')" ] && echo "Failing tests:$failed_names"
107
- if [ "$fail" -eq 0 ]; then echo "ALL PASSED"; else echo "FAILED: $fail"; exit 1; fi
111
+ if [ "$fail" -eq 0 ]; then echo "ALL PASSED$skipped"; else echo "FAILED: $fail"; exit 1; fi