Squash danusha2345's PR #1511 at d282f9e8 onto main 8c9c4761,
preserving its nine non-merge commits and main's existing Unreleased notes.
Calls in Kotlin, Java, TS/JS, Scala, Rust and Python declaration initializers
now retain the owner established by the upstream regression expectations.
Include the upstream CFML, dynamic-dispatch summary and viewer follow-ups.
Linux fail-to-pass validation (Node 22.19.0, rebuilt dist and native kernel):
- Before: TS load belonged to file:app.ts; Python/Kotlin/Scala/Rust calls
vanished; Java lost the field-lambda, anonymous override and eager calls.
- After: all six languages PASS; 12 native/WASM LF/CRLF parity checks PASS.
- Focused initializer regressions: 10 passed with CODEGRAPH_KERNEL=0 and
10 passed with the kernel enabled; Kotlin's grammar fallback is recorded.
- Related regression suites: 879 passed, 1 skipped across 15 test files.
- Evidence: /workspace/cg-1510-repro/before and /workspace/cg-1510-repro/after
(combined test output: after/vitest.log).
Fixes #1510
Supersedes #1511
Co-authored-by: Colby McHenry <colbymchenry@users.noreply.github.com>
Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
This commit is contained in:
co-authored by
Colby McHenry
danusha2345
parent
8c9c4761b0
commit
9181dd1ef3
@@ -277,8 +277,16 @@ export function resolveNamedTokens(
|
||||
const segPool = new Set<string>();
|
||||
for (const t of tokens) for (const s of t.toLowerCase().split(/::|\./)) if (s) segPool.add(s);
|
||||
|
||||
// RAW edges, not getCallers/getCallees: those return one row per NEIGHBOUR
|
||||
// (the #1086 de-dup), so when a pair is joined by BOTH a static and a
|
||||
// synthesized edge the static one wins and the synthesized one becomes
|
||||
// invisible — which is exactly what happens once a thunk's `dispatch(x)`
|
||||
// is walked statically. The question here is about the graph, not about
|
||||
// callers, so ask the edges directly.
|
||||
const hasHeuristicEdge = (id: string): boolean =>
|
||||
[...cg.getCallers(id), ...cg.getCallees(id)].some(({ edge }) => edge.provenance === 'heuristic');
|
||||
[...cg.getIncomingEdges(id), ...cg.getOutgoingEdges(id)].some(
|
||||
(e) => e.provenance === 'heuristic'
|
||||
);
|
||||
|
||||
for (const t of tokens) {
|
||||
const hits = findAllSymbols(cg, t).nodes;
|
||||
|
||||
Reference in New Issue
Block a user