v0.5.1
meta-ast v0.5.1
Polyglot static analysis engine for Python, JavaScript, TypeScript, TSX, C, C++, Rust, Go, and Ruby.
See the README for usage.
Features
- cli: Wire --language flag through pipeline and watch mode (31504b7)
- deploy: Make max pod size configurable via --max-pod-size (fdbc0aa)
- error: Add InvalidSourceUri error variant and update STRUCTURE.md (90b340a)
- extractor: Define InMemorySource, VersionedExtraction, and ExtractionIdGenerators (f506467)
- model: Derive Deserialize for UnresolvedImport, UnresolvedReference, and Symbol (7f026ed)
- shard: Implement ShardEdge and ShardError type definitions (63cba6b)
- shard: Define ShardFile, ShardSymbol, ShardHeader, and ShardManifestRecord (cf3ed1f)
- shard: Implement stable naming and symbol descriptor hierarchy in name.rs (2fc6f3b)
- extractor: Implement extract_text_with_id_gen for in-memory buffer analysis (620a6c1)
- resolver: Add clear_cache support to PythonResolver and GoModResolver (b1e1f2c)
- resolver: Add clear_cache support to JsResolver and TsConfigResolver (0f5dcfb)
- resolver: Implement stateful cache invalidation across all import resolvers (7459111)
- graph: Update serialize_symbol_node to emit source_range and file_path (0c380bc)
- graph: Bump graph export SCHEMA_VERSION to 2 (0257c21)
- extractor: Wire ExtractionIdGenerators into parallel extraction pipelines (5b1b310)
- extractor: Export in-memory extraction functions and types (f1ff8ab)
- language: Derive Deserialize for LangId enum (a9260b8)
- lib: Re-export in-memory extraction and shard persistence types in crate root (f8ea171)
- output: Re-export shard module in output module root (253c90c)
- output: Include file_path and source_range in SerializedNode struct (7d7768c)
- output: Update graph serialization tests for schema version 2 (1ad231f)
- watch: Update reanalyze module to use ExtractionIdGenerators (a3a3df0)
- watch: Ensure unique ID generator allocation across incremental ticks (bde5372)
- lsp: Implement RFC 0012 Phase 0 engine seams and .metast v2 shard persistence (#58) (306de40)
Bug Fixes
- cli: Correct language help text, serde names, and watch filter (5f9feeb)
- resolver: Handle filesystem cache invalidation on dynamic config changes (e472f46)
Performance
- graph: O(1) edge dedup via (src,dst,kind) index (97c702c)
Refactoring
- cli: Canonicalize JavaScript and TypeScript lang names (0a79351)
- graph: Encapsulate petgraph DiGraph behind CodeGraph methods (c78f370)
- graph: Hoist graph() binding and document add_node index contract (f9d1154)
- graph: Remove dead add_metacall_load and lock canonical language names (bdc8a11)
- graph: Restrict SCC analysis to dependency subgraph (8e123c1)
- shard: Ensure deterministic symbol ordinal generation (9667c97)
- extractor: Add ID accessors and fix resolver poisoning (62f00d3)
- input: Centralize path normalization helpers (9f3375b)
- Refactor(graph): optimize edge deduplication and normalize confidence
ladders (dc7283e) - Refactor(model): Add FileExtraction helper constructors to reduce
boilerplate (4dead60) - Refactor(pipeline): enforce deterministic output sorting for edges and
extractions (9891201) - language: Deduplicate import resolution logic (136f036)
Documentation
- arch: Clarify --language filter semantics and cover max-pod-size guard (511e197)
- Update FINAL_REPORT.md for GSoC 2026 completion (f59f18f)
- Add RFC 0012 for polyglot LSP server (62fe460)
- Update RFC 0012 with enrichment and LSP phases (1969554)
- Update RFC 0012 for polyglot LSP server (008cf27)
- Approve RFC 0012 polyglot LSP server proposal (8317b34)
- Update project roadmap and documentation (8feba97)
- Update README, ROADMAP, and STRUCTURE for RFC 0012 Phase 0 (11f7436)
- specs: Document schema version 2 and .metast v2 shard persistence semantics (5d0cadf)
Testing
- deploy: Use DEFAULT_MAX_POD_SIZE constant and scope negative assertion (e83465e)
- bench: Add postbuild edge normalization benchmark (bfae3ef)
- graph: Cover build-populated edge index dedup path (ed44942)
- extractor: Add unit tests for in-memory text extraction and URI validation (760b9fa)
- shard: Add unit tests for shard, header, and manifest JSONL round-trip (e5e0f82)
- datagraph: Assert symbol node file_path and source_range in integration tests (22904b7)
- shard: Add end-to-end multi-file shard persistence integration test (9314687)
CI
- docs: Split mdbook build and pages-deploy into separate jobs (968d4a9)
Maintenance
- Remove TODO list and use github issues (de82973)
- Add GitHub issue and PR templates (4e9c70a)
- deps: Add url and blake3 core dependencies in Cargo.toml (5ca3e40)
- cargo: Update feature flags and watch dependencies in Cargo.toml (3586e67)
- lock: Update Cargo.lock for url and blake3 dependencies (676cc2c)
Other Changes
- Implement dataflow extraction for JavaScript, TypeScript, and TSX (#56)
- feat(dataflow): add shared JS-family dataflow query and helper
Introduce the intra-procedural def-use primitives for the JavaScript
grammar and a shared extract_js_family_dataflow_with_query helper
that the TypeScript and TSX extractors will reuse.
JS_DATAFLOW_QUERY_STR: tree-sitter pattern covering
variable_declarator / formal_parameters / assignment_pattern params /
identifier usages in call, binary, member, return, and assignment
expression context. Capture names follow a shared schema:
@def.var,@def.param,@use.var.TS_FAMILY_DATAFLOW_QUERY: equivalent schema for the TypeScript
grammar (matchesrequired_parameter/optional_parameterfor
typed parameters). Defined here so TS and TSX can share the string.extract_js_family_dataflow_with_query(pub(crate)): the
def-capture / use-matching / edge-emission core. Accepts the
language's compiled query andFUNCTION_KINDSlist so computed
functions (arrow, function_expression, generator, method) are
treated as new intra-procedural scopes.- Usage-side fixes: each
@use.varregisters a realDataNode
before emitting aFlowEdge, so source/target IDs both refer to
nodes present in the graph (no dangling edges). Edges emit
FlowKind::DefUsewith confidence 0.9, matching the Rust/Python
heuristic. - Scope walker (
find_enclosing_function) recurses into children
before testing the current node so the innermost scope is returned,
not the outermost. Without this, nestedreturn xwould bind to
the outerlet xinstead of the inner one.
All symbols are feature-gated behind #[cfg(feature = "dataflow")].
The dispatcher and per-language entry points land in the next commit.
- feat(dataflow): wire TS/TSX dataflow entry points and dispatcher
Land the per-language entry points that compile a tree-sitter query
against the TS/TSX grammars and delegate to the shared helper, and
update the dataflow dispatcher to route JavaScript, TypeScript,
and Tsx to them.
typescript.rs:TS_DATAFLOW_QUERYcompiles
TS_FAMILY_DATAFLOW_QUERYagainstLANGUAGE_TYPESCRIPT;
extract_typescript_dataflowdelegates withTS_FUNCTION_KINDS.tsx.rs:TSX_DATAFLOW_QUERYandextract_tsx_dataflowmirror
the TS wiring againstLANGUAGE_TSX.dataflow.rs:- Dispatcher routes
LangId::JavaScript/
LangId::TypeScript/LangId::Tsxto the new entry points. - Status table now lists JS, TS, and TSX as Implemented, with
separate rows so the per-language state is unambiguous. unsupported_lang_returns_emptytest now exercises
LangId::Ruby(the actual canonical "unsupported" case after
the JS family landed).- New
javascript_dispatch_returns_dataflowtest asserts the
dispatcher produces both DataNodes and FlowEdges for a minimal JS
snippet, so wiring regressions show up at the unit-test layer.
- Dispatcher routes
All new symbols are feature-gated behind
#[cfg(feature = "dataflow")].
- test(dataflow): cover JS/TS/TSX extraction with oracle tests and fixtures
Add real oracle tests (not just print-and-hope) for the JS-family
dataflow extractors, plus pipeline-level tests and dedicated fixtures.
Per-language dataflow_tests modules (feature-gated):
-
src/language/javascript.rs— 8 tests: const capture as Local,
parameter capture as Parameter, edge anchoring (no dangling IDs),
no cross-function def-use leak, arrow function as new scope,
no edges for undefined names, empty function yields nothing, and
the fixture-file run.no_cross_function_def_use_leakasserts
that eachreturn xbinds to the def in its own scope and not
the outer one. -
src/language/typescript.rs— 6 tests: typed-let capture, typed
parameters as Parameter, edge anchoring, regression for
no_duplicate_def_for_typed_let(the original PR captured typed
bindings twice), andcross_function_scopingwith explicit
inner-def / outer-def / inner-use / outer-use edge assertions. -
src/language/tsx.rs— 4 tests: typed props parameter, edge
anchoring, cross-function scoping with arrow-as-scope, and the
fixture run.
New fixtures (so the dataflow pipeline has substantive content):
tests/fixtures/javascript/dataflow.jstests/fixtures/typescript/dataflow.tstests/fixtures/tsx/dataflow.tsx
Each exercises typed parameters, locals, and calls so both
definitions and usages are present.
Integration tests in tests/integration/datagraph_test.rs:
dataflow_pipeline_extracts_on_javascript_fixturesdataflow_pipeline_extracts_on_typescript_fixtures- `dataflow_pipeline_extracts_on_tsx_fixtures"
These mirror the existing Python pipeline test and assert that the
meta_ast::extractor populates data_nodes and flow_edges
on real fixture directories. (54cb21a)
- Refactor language module import resolvers and dataflow extraction to
centralize and improve maintainability (377fb39)
Install
- CLI:
cargo install meta-ast --version 0.5.1 - Library:
cargo add meta-ast@0.5.1 - Prebuilt binaries are attached for Linux (glibc and musl), macOS (x86_64 and aarch64), and Windows (x86_64 and aarch64), in core and
metacall-deployvariants.
Full Changelog: v0.5.0...v0.5.1