Split out of #1595 (reports 2 and 6b of 9) — filed by @rrodriguesNutrium, credit to them. Related to #1538.
graph_builder.py carries several shadowed method definitions, left behind when the file was split into indexing/persistence/writer.py and indexing/resolution/.
At least three independently shadowed names:
add_file_to_graph — defined twice; the later definition wins
_create_all_function_calls — separately shadowed by a later definition
add_repository_to_graph — also defined twice
Plus two orphaned methods whose live equivalents now live elsewhere:
_resolve_inheritance_link — zero call sites in src/; live equivalent is the free function at indexing/resolution/inheritance.py:9
_create_csharp_inheritance_and_interfaces — zero call sites here; the live one is on GraphWriter (writer.py:891)
Why this is more than tidiness: the dead add_file_to_graph's item_mappings has drifted from the live one — the live list handles objects, mixins, extensions, modules and enum_members; the dead one handles none of them. Anyone reading the file top-to-bottom to learn which node types reach the graph gets a wrong answer, and nothing in the file signals which copy wins.
The reporter verified that deleting the unreachable region is behaviour-preserving (unit suite byte-identical before and after, every removed name traced to a live equivalent or zero call sites).
Split out of #1595 (reports 2 and 6b of 9) — filed by @rrodriguesNutrium, credit to them. Related to #1538.
graph_builder.pycarries several shadowed method definitions, left behind when the file was split intoindexing/persistence/writer.pyandindexing/resolution/.At least three independently shadowed names:
add_file_to_graph— defined twice; the later definition wins_create_all_function_calls— separately shadowed by a later definitionadd_repository_to_graph— also defined twicePlus two orphaned methods whose live equivalents now live elsewhere:
_resolve_inheritance_link— zero call sites insrc/; live equivalent is the free function atindexing/resolution/inheritance.py:9_create_csharp_inheritance_and_interfaces— zero call sites here; the live one is onGraphWriter(writer.py:891)Why this is more than tidiness: the dead
add_file_to_graph'sitem_mappingshas drifted from the live one — the live list handlesobjects,mixins,extensions,modulesandenum_members; the dead one handles none of them. Anyone reading the file top-to-bottom to learn which node types reach the graph gets a wrong answer, and nothing in the file signals which copy wins.The reporter verified that deleting the unreachable region is behaviour-preserving (unit suite byte-identical before and after, every removed name traced to a live equivalent or zero call sites).