Problem
_make_id(stem, name) uses only the file stem to generate node IDs. When a project has multiple files with the same name in different directories (e.g. src/App1/Program.cs and src/App2/Program.cs), their nodes collide — methods from both files merge into a single node, producing an incorrect graph.
This is common in .NET solutions where each project has its own Program.cs, Startup.cs, AssemblyInfo.cs, etc.
Proposed Fix
Add a post-extraction pass that detects colliding node IDs (multiple nodes from different source_file paths sharing the same ID) and disambiguates them by prepending the parent directory name.
For example:
program_program → app1_program_program and app2_program_program
Impact
Tested on a .NET solution with 2 Program.cs files — nodes are now correctly separated.
I have a PR ready.
Problem
_make_id(stem, name)uses only the file stem to generate node IDs. When a project has multiple files with the same name in different directories (e.g.src/App1/Program.csandsrc/App2/Program.cs), their nodes collide — methods from both files merge into a single node, producing an incorrect graph.This is common in .NET solutions where each project has its own
Program.cs,Startup.cs,AssemblyInfo.cs, etc.Proposed Fix
Add a post-extraction pass that detects colliding node IDs (multiple nodes from different
source_filepaths sharing the same ID) and disambiguates them by prepending the parent directory name.For example:
program_program→app1_program_programandapp2_program_programImpact
Tested on a .NET solution with 2
Program.csfiles — nodes are now correctly separated.I have a PR ready.