From 5062e34a88d76095037f639c19f9b0060443d69d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 04:47:35 +0000 Subject: [PATCH] ci(migration-assistant): fix smoke-parse invocation for tree-sitter-cli 0.25 The `--paths` flag was repurposed in tree-sitter-cli >= 0.25 to point at a *file* listing input source paths, not a directory containing the grammar. Under the resolved 0.25.10, the step fails with `Failed to read paths file ... Is a directory (os error 21)`. Run the parser from within the vendored grammar tree instead, which is the documented 0.25.x lookup mechanism. https://claude.ai/code/session_01HZ3i2wX5R5rbY8Ycmug4Ao --- .github/workflows/ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79fc48f..ef267c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,6 +183,14 @@ jobs: # ReScript source. Picks the existing res-to-affine test fixture # so any drift in the pinned commit's syntactic surface area # surfaces here rather than at walker-rule writing time. + # + # NOTE: tree-sitter-cli >= 0.25 repurposed `--paths` to mean "a + # file listing input source paths", not "a directory containing + # a grammar". Grammar lookup is now driven by the current + # working directory (the CLI walks up looking for grammar.js / + # src/parser.c), so we cd into the vendored grammar tree and + # pass an absolute path to the fixture. Without this, the step + # fails with `Failed to read paths file ... Is a directory`. run: | shopt -s nullglob fixtures=(tools/res-to-affine/test/fixtures/*.res) @@ -190,9 +198,7 @@ jobs: echo "no .res fixtures to smoke-parse; skipping" exit 0 fi - tree-sitter parse \ - --quiet \ - "${fixtures[0]}" \ - --paths tools/vendor/tree-sitter-rescript \ - > /dev/null + fixture_abs="$(realpath "${fixtures[0]}")" + ( cd tools/vendor/tree-sitter-rescript \ + && tree-sitter parse --quiet "${fixture_abs}" > /dev/null ) echo "smoke-parsed: ${fixtures[0]}"