You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(res-to-affine): land tree-sitter grammar build pipeline (Phase 2a, Refs #57)
Phase 2 of the `.res → .affine` migration assistant (#57) replaces the
Phase-1 line-regex scanner with a tree-sitter AST walker. The grammar
itself is manifest-vendored in `editors/tree-sitter-rescript/` (since
#314), but the actual build pipeline that turns the manifest into a
loadable parser had not been wired up. This commit is that wiring.
- `justfile` gains an `install-grammar` recipe that wraps the existing
`editors/tree-sitter-rescript/scripts/install.sh` so the bootstrap
step is a discoverable `just` recipe alongside `build`/`test`/etc.
- `editors/tree-sitter-rescript/scripts/install.sh` updates its error
message when the `tree-sitter` CLI is missing to point at both the
Rust-native install (`cargo install tree-sitter-cli`, the repo's
preferred path for CLI tooling per CLAUDE.md) and the existing
Node-based one (`npm install -g tree-sitter-cli`). The script
behaviour is unchanged when the CLI is present.
- `.github/workflows/ci.yml` gains a `migration-assistant` job that
installs the tree-sitter CLI via npm (the fast CI path — a pre-built
binary, ~5 s vs. ~5 min for `cargo install` from source), runs
`just install-grammar`, verifies `tools/vendor/tree-sitter-rescript/
src/parser.c` was produced, and smoke-parses the existing
`tools/res-to-affine/test/fixtures/sample.res` fixture. The job sits
alongside `vscode-smoke` as a Node-using carve-out under the same
reasoning (manifest dep on an npm-distributed tool whose binary
output is what we actually consume; no new TS source in this repo).
- `editors/tree-sitter-rescript/README.md` documents the dual install
path, the new justfile recipe, and the CI gate.
Phase 2b (the actual walker — `walker.ml`, AST-based detection of
`side-effect-import`, `--engine` CLI flag, snapshot tests vs. the
regex scanner) stacks on top of this branch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments