Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

Merge pull request #445 from ix-infrastructure/fix/440-baseurl-authority

KageBinary787f466a7d98
diff --cc core-ingestion/src/index.ts
index 94a0ea99,ae161bbf..41b7d572
--- a/core-ingestion/src/index.ts
+++ b/core-ingestion/src/index.ts
@@@ -3986,16 -4016,31 +4016,37 @@@ export function resolveEdges
srcLanguage,
binding.pkg,
binding.pkg,
+ rel.predicate === 'CALLS' ? 'runtime' : 'types',
))];
+ if (
+ configuredBindingTargets !== undefined &&
+ providerFiles.length === 1 &&
+ fileHasSymbol.get(providerFiles[0])?.has(binding.imported)
+ ) {
+ const fp = providerFiles[0];
+ const dstQualifiedKey = bestQKey(fileQKeys, fp, binding.imported);
+ if (dstQualifiedKey !== null) {
+ resolved.push({
+ srcFilePath,
+ srcName,
+ dstFilePath: fp,
+ dstName: origDstName,
+ dstQualifiedKey,
+ predicate: rel.predicate,
+ confidence: 0.9,
+ });
+ continue;
+ }
+ }
const publicMatches: Array<{ fp: string; local: string }> = [];
for (const fp of providerFiles.length === 1 ? providerFiles : []) {
- const local = filePublicNames.get(fp)?.get(binding.imported);
+ // `imported` is the literal sentinel 'default' for a default import, never a
+ // real export name, so a provider member that happens to be *called* `default`
+ // (a method, getter, or static) must not satisfy the fallback.
+ const local = filePublicNames.get(fp)?.get(binding.imported)
+ ?? (binding.imported !== 'default' && fileHasSymbol.get(fp)?.has(binding.imported)
+ ? binding.imported
+ : undefined);
if (local && fileHasSymbol.get(fp)?.has(local)) publicMatches.push({ fp, local });
}
if (publicMatches.length === 1) {