Skip to content

Commit 8ea7474

Browse files
committed
feat: add Java + C# parsers, improve skip messaging with extension breakdown
Adds JavaParser (classes, interfaces, enums, records, methods, @test annotations, imports) and CSharpParser (classes, structs, interfaces, enums, records, namespaces, methods, properties, [Test]/[Fact] attributes, using directives, async detection). Skip messaging now shows unsupported extension breakdown: "Unsupported: 1913 files [.xml(800), .txt(400), .md(300), ...]" instead of just "skipped: 1913". Supported languages: Python, Rust, TypeScript, JavaScript, Go, C++, Java, C#. Bumps to v0.2.6.
1 parent e034128 commit 8ea7474

12 files changed

Lines changed: 845 additions & 13 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ members = [
99
exclude = ["npm/wasm"]
1010

1111
[workspace.package]
12-
version = "0.2.5"
12+
version = "0.2.6"
1313
edition = "2021"
1414
license = "MIT"
1515
repository = "https://github.com/agentralabs/agentic-codebase"
@@ -19,7 +19,7 @@ authors = ["Agentra Labs <contact@agentralabs.tech>"]
1919
[package]
2020
default-run = "acb"
2121
name = "agentic-codebase"
22-
version = "0.2.5"
22+
version = "0.2.6"
2323
edition = "2021"
2424
license = "MIT"
2525
repository = "https://github.com/agentralabs/agentic-codebase"
@@ -56,6 +56,8 @@ tree-sitter-typescript = "0.21"
5656
tree-sitter-javascript = "0.21"
5757
tree-sitter-go = "0.21"
5858
tree-sitter-cpp = "0.21"
59+
tree-sitter-java = "0.21"
60+
tree-sitter-c-sharp = "0.21"
5961

6062
# Compression
6163
lz4_flex = "0.11"

crates/agentic-codebase-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "agentic-codebase-cli"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
edition = "2021"
55
license = "MIT"
66
repository = "https://github.com/agentralabs/agentic-codebase"
@@ -15,6 +15,6 @@ name = "acb"
1515
path = "src/main.rs"
1616

1717
[dependencies]
18-
agentic-codebase = { path = "../..", version = "0.2.5" }
18+
agentic-codebase = { path = "../..", version = "0.2.6" }
1919
clap = { version = "4", features = ["derive"] }
2020
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

crates/agentic-codebase-ffi/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "agentic-codebase-ffi"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
edition = "2021"
55
license = "MIT"
66
repository = "https://github.com/agentralabs/agentic-codebase"
@@ -14,7 +14,7 @@ categories = ["api-bindings"]
1414
crate-type = ["cdylib", "rlib"]
1515

1616
[dependencies]
17-
agentic-codebase = { path = "../..", version = "0.2.5" }
17+
agentic-codebase = { path = "../..", version = "0.2.6" }
1818
pyo3 = { version = "0.20", features = ["extension-module"], optional = true }
1919
wasm-bindgen = { version = "0.2", optional = true }
2020
serde-wasm-bindgen = { version = "0.6", optional = true }

crates/agentic-codebase-mcp/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "agentic-codebase-mcp"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
edition = "2021"
55
license = "MIT"
66
repository = "https://github.com/agentralabs/agentic-codebase"
@@ -15,7 +15,7 @@ name = "agentic-codebase-mcp"
1515
path = "src/main.rs"
1616

1717
[dependencies]
18-
agentic-codebase = { path = "../..", version = "0.2.5", features = ["stdio"] }
18+
agentic-codebase = { path = "../..", version = "0.2.6", features = ["stdio"] }
1919
clap = { version = "4", features = ["derive"] }
2020
sha2 = "0.10"
2121
walkdir = "2"

src/cli/commands.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,21 @@ fn cmd_compile(
10791079
cov.total_skipped(),
10801080
parse_result.stats.files_errored
10811081
);
1082+
if cov.skipped_unknown_language > 0 && !cov.unsupported_extensions.is_empty() {
1083+
let mut exts: Vec<_> = cov.unsupported_extensions.iter().collect();
1084+
exts.sort_by(|a, b| b.1.cmp(a.1));
1085+
let top: Vec<_> = exts
1086+
.iter()
1087+
.take(8)
1088+
.map(|(ext, count)| format!(".{}({})", ext, count))
1089+
.collect();
1090+
eprintln!(
1091+
" {} Unsupported: {} files [{}]",
1092+
s.info(),
1093+
cov.skipped_unknown_language,
1094+
top.join(", ")
1095+
);
1096+
}
10821097
if !parse_result.errors.is_empty() {
10831098
eprintln!(
10841099
" {} {} parse errors (use --verbose to see details)",
@@ -1162,6 +1177,7 @@ fn cmd_compile(
11621177
"files_errored_total": parse_result.stats.files_errored,
11631178
"skip_reasons": {
11641179
"unknown_language": cov.skipped_unknown_language,
1180+
"unsupported_extensions": cov.unsupported_extensions,
11651181
"language_filter": cov.skipped_language_filter,
11661182
"exclude_pattern": cov.skipped_excluded_pattern,
11671183
"too_large": cov.skipped_too_large,
@@ -1245,6 +1261,21 @@ fn cmd_compile(
12451261
cov.total_skipped(),
12461262
parse_result.stats.files_errored
12471263
);
1264+
if cov.skipped_unknown_language > 0 && !cov.unsupported_extensions.is_empty() {
1265+
let mut exts: Vec<_> = cov.unsupported_extensions.iter().collect();
1266+
exts.sort_by(|a, b| b.1.cmp(a.1));
1267+
let top: Vec<_> = exts
1268+
.iter()
1269+
.take(8)
1270+
.map(|(ext, count)| format!(".{}({})", ext, count))
1271+
.collect();
1272+
let _ = writeln!(
1273+
out,
1274+
" Unsupported: {} files [{}]",
1275+
cov.skipped_unknown_language,
1276+
top.join(", ")
1277+
);
1278+
}
12481279
if let Some(report_path) = coverage_report {
12491280
let _ = writeln!(
12501281
out,

0 commit comments

Comments
 (0)