mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-26 16:46:41 +00:00
fix(extract): don't promote module-imported same-named calls to EXTRACTED (#2945)
When an ambiguous bare call resolves to a candidate solely because the
caller imported the candidate's source module (not the symbol itself), the
edge was promoted to EXTRACTED, falsely certifying a same-named symbol that
was never actually imported. Keep the resolution (for graph connectivity) but
mark it INFERRED. Symbol-level (from X import Y) imports still promote to
EXTRACTED.
(cherry picked from commit e73ca4e4a7)
This commit is contained in:
1 parent
c588b72d93
commit
ac4b5e33dd
1 file changed
+5
-1
+5
-1
@@ -10714,7 +10714,11 @@ def extract(
|
||||
]
|
||||
if len(module_matches) == 1:
|
||||
tgt = module_matches[0]
|
||||
has_import_evidence = True
|
||||
# Module-level import evidence only proves the caller pulled in
|
||||
# the callee's source file, not that it imported this specific
|
||||
# symbol. Promoting to EXTRACTED here falsely certifies a
|
||||
# same-named symbol that was never actually imported (#2945).
|
||||
has_import_evidence = False
|
||||
else:
|
||||
# No unique import evidence. Instead of dropping the edge
|
||||
# outright (which let a single same-named test mock erase the
|
||||
|
||||
Reference in new issue
Block a user