You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eaf5904
Browse filesBrowse the repository at this point in the historyBrowse files
fix(registry): stop external package imports binding to project homonyms
A bare call whose name the calling file imports from a package outside the
indexed tree was bound to whatever project symbol shared the simple name.
An `import { eq, sql } from "drizzle-orm"` plus an unrelated local module
exporting `eq`/`sql` produced two CALLS edges from the caller into that
module, strategy unique_name — the same defect on the sequential and the
fused-parallel resolver. The TS-LSP is not involved: it declines the
external names, and the textual registry fallback fires anyway.
The package materializes no node, so resolve_import_node returns NULL, no
IMPORTS edge is written, and the per-file import map carries no key for the
name. Strategies 1-2 miss and resolve_name_lookup binds the call by simple
name. Confidence does not separate the cases: the fabricated edge lands at
0.75 whenever the file also imports anything from the target's module.
Add cbm_suppress_external_import_shadow(), a pure predicate beside the
existing perl/tsjs/cross-language guards and called at the same two emit
sites. It drops the edge only when the callee is a bare identifier, the
strategy is a project-wide guess (suffix_match / unique_name /
field_type_hint / fuzzy), the file imports that exact local name from a
non-relative specifier, and no import-map key binds it. Relative specifiers
are excluded on purpose: they name a path inside the tree, so a missing
IMPORTS edge there is an in-project resolution gap and the fallback can
still be right. A name imported both relatively and from a package keeps
its edge, independently of extraction order.
Addresses the external-import sub-case of DeusData#1355.
Signed-off-by: Yyunozor <yyunozor@icloud.com>
0 commit comments