Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
415 changes: 186 additions & 229 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/graphify-detect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ graphify-security = { workspace = true }
hex = { workspace = true }
ignore_walk = { version = "0.4", package = "ignore" }
indexmap = { workspace = true }
lopdf = "0.44"
lopdf = "0.45"
md5 = "0.8"
quick-xml = { workspace = true }
rayon = { workspace = true }
Expand All @@ -31,7 +31,7 @@ unicode-normalization = { workspace = true }
zip = { version = "8", default-features = false, features = ["deflate"] }

[dev-dependencies]
lopdf = "0.44"
lopdf = "0.45"
serial_test = { workspace = true }
tempfile = { workspace = true }

Expand Down
4 changes: 2 additions & 2 deletions crates/graphify-export/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ htmlescape = { workspace = true }
indexmap = { workspace = true }
neo4rs = "0.8"
rayon = { workspace = true }
redis = { version = "1.6", optional = true }
redis = { version = "1.7", optional = true }
regex = { workspace = true }
serde_json = { workspace = true }
sha1 = "0.11"
Expand All @@ -35,7 +35,7 @@ falkordb = ["dep:redis"]
[dev-dependencies]
# Used only by the `net_*` FalkorDB integration tests to read back graph state
# (`GRAPH.QUERY`) after a push.
redis = "1.6"
redis = "1.7"
serial_test = { workspace = true }
tempfile = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion crates/graphify-extract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ unicode-normalization = { workspace = true }
walkdir = { workspace = true }

# Core tree-sitter + language grammars (workspace versions)
tree-sitter = "0.26"
tree-sitter = "0.27"
tree-sitter-bash = "0.25"
tree-sitter-c = "0.24"
tree-sitter-c-sharp = "0.23"
Expand Down
2 changes: 1 addition & 1 deletion crates/graphify-extract/src/extractors/julia/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub(super) fn walk_calls_julia(
});
}
} else if callee_node.kind() == "field_expression" && callee_node.child_count() >= 3 {
let count = u32::try_from(callee_node.child_count()).unwrap_or(0);
let count = callee_node.child_count();
let method_node = callee_node.child(count - 1);
if let Some(mn) = method_node {
let method_name = read_text(mn, source);
Expand Down
5 changes: 2 additions & 3 deletions crates/graphify-extract/src/extractors/julia/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,8 @@ pub(super) fn walk_julia(
deferred: false,
metadata: None,
});
// Walk RHS only (last child). tree-sitter 0.26 changed
// `child()` to accept `u32`; cast the index explicitly.
let count = u32::try_from(node.child_count()).unwrap_or(0);
// Walk RHS only (last child).
let count = node.child_count();
if count >= 3
&& let Some(rhs) = node.child(count - 1)
{
Expand Down
7 changes: 3 additions & 4 deletions crates/graphify-extract/src/generic/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,8 @@ fn extract_callee(
callee_name = Some(read_text_owned(first, source));
} else if first.kind() == "navigation_expression" {
is_member_call = true;
// Reversed scan for last simple_identifier. tree-sitter 0.26
// moved `Node::child` to take `u32`; cast inside the loop.
let count = u32::try_from(first.child_count()).unwrap_or(0);
// Reversed scan for last simple_identifier.
let count = first.child_count();
for i in (0..count).rev() {
if let Some(c) = first.child(i)
&& matches!(c.kind(), "simple_identifier" | "identifier")
Expand All @@ -422,7 +421,7 @@ fn extract_callee(
if let Some(field) = first.child_by_field_name("field") {
callee_name = Some(read_text_owned(field, source));
} else {
let count = u32::try_from(first.child_count()).unwrap_or(0);
let count = first.child_count();
for i in (0..count).rev() {
if let Some(c) = first.child(i)
&& c.kind() == "identifier"
Expand Down
5 changes: 2 additions & 3 deletions crates/graphify-extract/src/generic/js_extra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,8 @@ pub(super) fn dynamic_import_js(
loop {
let arg = cur.node();
let raw: Option<String> = if arg.kind() == "template_string" {
// Skip dynamic template literals with substitutions. tree-sitter 0.26
// requires `Node::child` to be called with `u32`; cast the bound.
let count = u32::try_from(arg.child_count()).unwrap_or(0);
// Skip dynamic template literals with substitutions.
let count = arg.child_count();
let has_sub = (0..count).any(|i| {
arg.child(i)
.is_some_and(|c| c.kind() == "template_substitution")
Expand Down
5 changes: 1 addition & 4 deletions crates/graphify-extract/src/postprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,10 +849,7 @@ fn collect_swift_extension_names(
source: &[u8],
names: &mut HashSet<String>,
) {
// tree-sitter `child()` takes a `u32` index while `child_count()` returns
// `usize`. AST nodes never exceed 2^32 children in practice; truncate
// explicitly with the cap so clippy doesn't flag the lossy cast.
let child_count: u32 = u32::try_from(node.child_count()).unwrap_or(u32::MAX);
let child_count = node.child_count();
if node.kind() == "class_declaration" {
let is_extension = (0..child_count)
.filter_map(|i| node.child(i))
Expand Down