mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 22:02:49 +08:00
Same-kind, same-name declarations on one line shared an ID and silently overwrote each other in SQLite. Use per-extraction collision tracking to append a UTF-16 column only to later distinct declarations. Apply the same rule across wasm, Rust language walkers, Liquid, and CFML while preserving file IDs and edge endpoints. Add persistence, call-edge, identity-vector, and Unicode parity regressions. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -141,6 +141,7 @@ pub struct Walker<'t> {
|
||||
file_path: &'t str,
|
||||
line_starts: Vec<usize>,
|
||||
arena: Arena,
|
||||
node_id_allocator: ids::NodeIdAllocator,
|
||||
tables: Tables,
|
||||
stack: Vec<Scope>,
|
||||
node_ids: Vec<String>,
|
||||
@@ -171,6 +172,7 @@ pub fn extract(file_path: &str, source: &str) -> Result<EmitOut, String> {
|
||||
file_path,
|
||||
line_starts: util::line_starts(source),
|
||||
arena: Arena::default(),
|
||||
node_id_allocator: ids::NodeIdAllocator::default(),
|
||||
tables: Tables::default(),
|
||||
stack: Vec::new(),
|
||||
node_ids: Vec::new(),
|
||||
@@ -276,7 +278,8 @@ impl<'t> Walker<'t> {
|
||||
return None;
|
||||
}
|
||||
let start_line = self.line_of(node);
|
||||
let id = ids::node_id(self.file_path, kind, name, start_line);
|
||||
let column = self.col_of(node);
|
||||
let id = self.node_id_allocator.generate(self.file_path, kind, name, start_line, column);
|
||||
let end_line = node.end_position().row as u32 + 1;
|
||||
|
||||
let qualified = {
|
||||
|
||||
Reference in New Issue
Block a user