mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-19 23:20:31 +08:00
16b5633749
The file-level dependency queries followed only `imports` edges, which are
same-file in this engine, so `codegraph affected` and getFileDependents returned
0 dependents for every file. Project the symbol-level edge graph instead, then
close the cross-file edge gaps that left real dependencies unlinked per language.
Queries:
- Add getDependentFilePaths / getDependencyFilePaths (one indexed JOIN over all
cross-file edge kinds except `contains`); getFileDependents/getFileDependencies
and circular-dependency detection now use them.
Extraction & resolution, by language:
- TypeScript/JS: extract in-body local type annotations; link every named,
default, re-export (`export {X} from`), and namespace import to its definition
(incl. tsconfig `@/` aliases), with a namespace-import file backstop.
- Python: link `from module import X` bindings (value imports, aliases, __init__
re-export barrels); resolve `from . import sub` + `sub.func()` module-member
access; fix Python dotted-relative import path resolution.
- Go: extract cross-package struct composite literals (`pkg.Type{...}`, incl.
package-level var registries) and `(*T)(x)` type conversions; implicit
interface satisfaction — extract interface methods, synthesize `implements`
edges via method-set matching, bridge interface dispatch to impls (#584).
- C#: index `record` / `record struct` declarations as types (#237).
Measured file-dependent coverage on real repos: this repo (TS) 62.5%->95.8%;
requests (Py) 54%->100%; gin (Go) 62.7%->96.6%; MediatR (C#) 81.5%->85.2%.
Node counts stay stable (edges added, not nodes, aside from real interface/record
symbols). Adds tests and CHANGELOG entries.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>