mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 13:53:01 +08:00
d8a2e91b2f
A KMP `common` source set declares `expect fun foo()` / `expect class Bar`; each platform source set (jvm, native, js, wasm) provides an `actual` implementation with the identical fully-qualified name in a different file. Callers in common code resolve to the `expect` declaration, so every platform `actual` ended up with zero dependents — invisible to impact/`affected` and showing an empty blast radius even though editing it can break every caller. - Capture the `expect`/`actual` platform modifiers at extraction via a new generic `extractModifiers` hook (Kotlin reads `modifiers > platform_modifier`), persisted onto the node's decorators list. - Synthesize a heuristic `calls` edge from the common declaration to each platform `actual` (mirroring the interface-impl bridge: abstract → concrete), matching by qualified name + the `actual` marker. The declaration side is the same-FQN, non-`actual` node, which also gates out plain cross-file overloads. - Widen kind matching so an `expect class` fulfilled by an `actual typealias` (a core KMP idiom: CancellationException, ReentrantLock, …) links too. Measured (fair cross-file dependent coverage, symbol-bearing source files): kotlinx.coroutines 76.8% → 93.5%; OkHttp holds at 96.2% (barely uses KMP). Node count stable (edges added, not nodes); residual is genuine frontiers (expect-decl sides with no in-repo callers, ServiceLoader/agent SPI, test infra). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>