Skip to content

Commit 446c053

Browse files
committed
feat(native): port Clojure extractor to Rust
Adds tree-sitter-clojure dependency and native extractor matching the WASM-side behavior for Clojure symbol, import, and call extraction. Part of #1071
1 parent 6ef7dc6 commit 446c053

11 files changed

Lines changed: 497 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegraph-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tree-sitter-dart = "0.0.4"
3535
tree-sitter-zig = "1"
3636
tree-sitter-haskell = "0.23"
3737
tree-sitter-ocaml = "0.24"
38+
tree-sitter-clojure-orchard = "0.2"
3839
rayon = "1"
3940
ignore = "0.4"
4041
globset = "0.4"

crates/codegraph-core/src/change_detection.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn load_file_hashes(conn: &Connection) -> Option<HashMap<String, FileHashRow>> {
132132
/// found on disk are treated as removed.
133133
///
134134
/// Files whose extension is outside the Rust file_collector's supported set
135-
/// (e.g. `.clj`, `.gleam`, `.jl`, `.fs` — WASM-only languages) are skipped:
135+
/// (e.g. `.gleam`, `.jl`, `.fs` — WASM-only languages) are skipped:
136136
/// the orchestrator's narrower collector never sees them, so absence from
137137
/// `current` is a capability boundary, not a deletion. Their `nodes` and
138138
/// `file_hashes` rows are owned by the JS-side WASM backfill (#967, #1068)
@@ -774,14 +774,13 @@ mod tests {
774774

775775
#[test]
776776
fn detect_removed_skips_unsupported_extensions() {
777-
// Files in WASM-only languages (Clojure, Gleam, Julia, F#) live in
777+
// Files in WASM-only languages (Gleam, Julia, F#) live in
778778
// `file_hashes` because the JS-side WASM backfill writes them, but
779779
// Rust's narrower file_collector never collects them. Without this
780780
// skip, every incremental rebuild would flag them as removed and
781781
// purge their rows — the #1066 ~2s floor.
782782
let mut existing = HashMap::new();
783783
for path in [
784-
"tests/fixtures/clojure/main.clj",
785784
"tests/fixtures/gleam/main.gleam",
786785
"tests/fixtures/julia/main.jl",
787786
"tests/fixtures/fsharp/Main.fs",

0 commit comments

Comments
 (0)