diff --git a/CHANGELOG.md b/CHANGELOG.md index de8abbd9..b391a59d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,28 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. -## [3.0.3](https://github.com/optave/codegraph/compare/v3.0.2...v3.0.3) (2026-03-04) +## [3.0.4](https://github.com/optave/codegraph/compare/v3.0.3...v3.0.4) (2026-03-05) -> **Note:** 3.0.2 was an internal/unpublished version used during development. +**Native engine goes full-stack: CFG, AST nodes, and WASM double-parse elimination.** This release completes the native engine migration — CFG computation and AST node extraction now run in Rust for 8 languages, eliminating the redundant WASM pre-parse on native builds. ### Performance -* **ast:** use single transaction for AST node insertion — astMs drops from ~3600ms to ~350ms (native) and ~547ms (WASM), reducing overall native build from 24.9 to 8.5 ms/file ([#333](https://github.com/optave/codegraph/pull/333)) -* **builder:** skip `ensureWasmTrees` when native engine provides complete CFG + dataflow data ([#344](https://github.com/optave/codegraph/pull/344)) +* **native:** compute CFG in Rust native engine for all 8 languages (JS/TS/TSX, Python, Go, Rust, Java, C#, Ruby, PHP) — ports `buildFunctionCFG` algorithm to Rust with per-language `CfgRules`, eliminates WASM re-parsing in CFG phase ([#342](https://github.com/optave/codegraph/pull/342)) +* **native:** extract AST nodes (call, new, throw, await, string, regex) for all non-JS languages in Rust via shared `walk_ast_nodes_with_config()` — astMs drops from ~651ms to ~50ms ([#340](https://github.com/optave/codegraph/pull/340)) +* **builder:** skip `ensureWasmTrees` entirely when native engine provides complete CFG + dataflow + AST data — wasmPreMs drops from ~388ms to 0 on native builds ([#344](https://github.com/optave/codegraph/pull/344)) ### Bug Fixes * **native:** fix function-scoped `const` declarations being incorrectly extracted as top-level constants ([#344](https://github.com/optave/codegraph/pull/344)) +* **benchmark:** show all build phases (astMs, cfgMs, dataflowMs, wasmPreMs) in benchmark report and document v3.0.0→v3.0.3 native regression cause ([#339](https://github.com/optave/codegraph/pull/339)) + +## [3.0.3](https://github.com/optave/codegraph/compare/v3.0.2...v3.0.3) (2026-03-04) +> **Note:** 3.0.2 was an internal/unpublished version used during development. + +### Performance + +* **ast:** use single transaction for AST node insertion — astMs drops from ~3600ms to ~350ms (native) and ~547ms (WASM), reducing overall native build from 24.9 to 8.5 ms/file ([#333](https://github.com/optave/codegraph/pull/333)) ## [3.0.2](https://github.com/optave/codegraph/compare/v3.0.1...v3.0.2) (2026-03-04) diff --git a/crates/codegraph-core/Cargo.toml b/crates/codegraph-core/Cargo.toml index 2f0a1102..9bd54f9d 100644 --- a/crates/codegraph-core/Cargo.toml +++ b/crates/codegraph-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "codegraph-core" -version = "3.0.3" +version = "3.0.4" edition = "2021" license = "Apache-2.0" diff --git a/package-lock.json b/package-lock.json index fe1e2889..b5968cea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@optave/codegraph", - "version": "3.0.3", + "version": "3.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@optave/codegraph", - "version": "3.0.3", + "version": "3.0.4", "license": "Apache-2.0", "dependencies": { "better-sqlite3": "^12.6.2", @@ -44,10 +44,13 @@ }, "optionalDependencies": { "@modelcontextprotocol/sdk": "^1.0.0", - "@optave/codegraph-darwin-arm64": "3.0.1", - "@optave/codegraph-darwin-x64": "3.0.1", - "@optave/codegraph-linux-x64-gnu": "3.0.1", - "@optave/codegraph-win32-x64-msvc": "3.0.1" + "@optave/codegraph-darwin-arm64": "3.0.4", + "@optave/codegraph-darwin-x64": "3.0.4", + "@optave/codegraph-linux-arm64-gnu": "3.0.4", + "@optave/codegraph-linux-arm64-musl": "3.0.4", + "@optave/codegraph-linux-x64-gnu": "3.0.4", + "@optave/codegraph-linux-x64-musl": "3.0.4", + "@optave/codegraph-win32-x64-msvc": "3.0.4" }, "peerDependencies": { "@huggingface/transformers": "^3.8.1" @@ -1644,9 +1647,9 @@ } }, "node_modules/@optave/codegraph-darwin-arm64": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@optave/codegraph-darwin-arm64/-/codegraph-darwin-arm64-3.0.1.tgz", - "integrity": "sha512-oedqUjOEyEwxUxWUssochZddSYIwE7YDhNOUluRW6omzE08PQPa9eGFyuAHWD58/eK1Up/vOtHJU0FCMJrCu/Q==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-darwin-arm64/-/codegraph-darwin-arm64-3.0.4.tgz", + "integrity": "", "cpu": [ "arm64" ], @@ -1657,9 +1660,9 @@ ] }, "node_modules/@optave/codegraph-darwin-x64": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@optave/codegraph-darwin-x64/-/codegraph-darwin-x64-3.0.1.tgz", - "integrity": "sha512-lZvL7K5T9x+eyULg/CzovX2NR4Cp3azuEEhNcZIOI+pVwFS2KIGcbpvwo7aXvnuUqWgclwxMs8d92coh/QclxQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-darwin-x64/-/codegraph-darwin-x64-3.0.4.tgz", + "integrity": "", "cpu": [ "x64" ], @@ -1669,10 +1672,49 @@ "darwin" ] }, + "node_modules/@optave/codegraph-linux-arm64-gnu": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-linux-arm64-gnu/-/codegraph-linux-arm64-gnu-3.0.4.tgz", + "integrity": "", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@optave/codegraph-linux-arm64-musl": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-linux-arm64-musl/-/codegraph-linux-arm64-musl-3.0.4.tgz", + "integrity": "", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@optave/codegraph-linux-x64-gnu": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@optave/codegraph-linux-x64-gnu/-/codegraph-linux-x64-gnu-3.0.1.tgz", - "integrity": "sha512-UCu6doZcPLFFuxRsSWxljY84UxZCVz8aMpuBlPzt8mzELaV19Klwc8fgeynugeGPuJDy8VXMMAh4na6XWc9+8w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-linux-x64-gnu/-/codegraph-linux-x64-gnu-3.0.4.tgz", + "integrity": "", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@optave/codegraph-linux-x64-musl": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-linux-x64-musl/-/codegraph-linux-x64-musl-3.0.4.tgz", + "integrity": "", "cpu": [ "x64" ], @@ -1683,9 +1725,9 @@ ] }, "node_modules/@optave/codegraph-win32-x64-msvc": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@optave/codegraph-win32-x64-msvc/-/codegraph-win32-x64-msvc-3.0.1.tgz", - "integrity": "sha512-orbjwsV7GprmlXZnkLQmH1JeYRofvzKb/MEJIX45d8I+wJ6mMPMRHwRNf0b3QcMTM0AW0PtJnc3ReS5RiqJSiQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@optave/codegraph-win32-x64-msvc/-/codegraph-win32-x64-msvc-3.0.4.tgz", + "integrity": "", "cpu": [ "x64" ], diff --git a/package.json b/package.json index e30a4843..fcde0aa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@optave/codegraph", - "version": "3.0.3", + "version": "3.0.4", "description": "Local code graph CLI — parse codebases with tree-sitter, build dependency graphs, query them", "type": "module", "main": "src/index.js", @@ -71,13 +71,13 @@ }, "optionalDependencies": { "@modelcontextprotocol/sdk": "^1.0.0", - "@optave/codegraph-darwin-arm64": "3.0.3", - "@optave/codegraph-darwin-x64": "3.0.3", - "@optave/codegraph-linux-arm64-gnu": "3.0.3", - "@optave/codegraph-linux-arm64-musl": "3.0.3", - "@optave/codegraph-linux-x64-gnu": "3.0.3", - "@optave/codegraph-linux-x64-musl": "3.0.3", - "@optave/codegraph-win32-x64-msvc": "3.0.3" + "@optave/codegraph-darwin-arm64": "3.0.4", + "@optave/codegraph-darwin-x64": "3.0.4", + "@optave/codegraph-linux-arm64-gnu": "3.0.4", + "@optave/codegraph-linux-arm64-musl": "3.0.4", + "@optave/codegraph-linux-x64-gnu": "3.0.4", + "@optave/codegraph-linux-x64-musl": "3.0.4", + "@optave/codegraph-win32-x64-msvc": "3.0.4" }, "devDependencies": { "@biomejs/biome": "^2.4.4",