Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
986de95
fix(vue): an import through `@/` or `~/` in a Vue project links the m…
colbymchenry Oct 18, 2026
53ad0d4
fix(sync): a member call on a local typed by an imported class links …
colbymchenry Oct 18, 2026
8ed0202
fix(resolution): workspace globs reach nested members, and a negated …
colbymchenry Oct 18, 2026
fb213d0
fix(ts): an array method on a local annotated as an array of a class …
colbymchenry Oct 18, 2026
10e316d
fix(ts): a typed call links to the method of the class the file impor…
colbymchenry Oct 19, 2026
34b17f6
fix(ts): a local annotated as one of a type's properties has that pro…
colbymchenry Oct 19, 2026
b860b21
fix(ts): a call on an imported value links to the class its file impo…
colbymchenry Oct 19, 2026
b210e0e
fix(ts): a this.<field> call finds a field a base class declares (#2645)
colbymchenry Oct 19, 2026
6071c9e
fix(ts): a field set through a wrapper has the wrapped class's type (…
colbymchenry Oct 19, 2026
d3a778d
fix(ts): a class extends the class after its type parameters (#2648)
colbymchenry Oct 19, 2026
de3eb71
fix(js,ts): an import written from a jsconfig or tsconfig baseUrl lin…
colbymchenry Oct 19, 2026
c7b5038
fix(ts): index abstract methods as methods of their class (#2653)
colbymchenry Oct 19, 2026
a944ec3
fix(go): a struct links the types its fields are declared with (#2655)
colbymchenry Oct 19, 2026
0c22acf
fix(ts): a call on a known class goes through that class's own bases …
colbymchenry Oct 19, 2026
c38f267
fix(ts): a supertype import that names a constant reaches the interfa…
colbymchenry Oct 19, 2026
6692e05
fix(go): an unexported name links its own package's declaration, and …
colbymchenry Oct 19, 2026
383c2cd
fix(go): an interface's methods link the types their signatures name …
colbymchenry Oct 19, 2026
93f85d1
fix(go): an explicitly named import owns its name over an unaliased i…
colbymchenry Oct 19, 2026
b4e1013
fix(ts): a receiver a dependency-injection call sets up has the class…
colbymchenry Oct 19, 2026
0d33925
fix(ts): a method whose name has a $ resolves through its receiver's …
colbymchenry Oct 19, 2026
90d6501
fix(go): a call of a standard method name like `err.Error()` links to…
colbymchenry Oct 19, 2026
a6cfb52
fix(sync): an import a barrel passes on under another name relinks wh…
colbymchenry Oct 19, 2026
5c1e55f
fix(go): a call on a package-level variable or constant links through…
colbymchenry Oct 19, 2026
437b5c3
fix(sync): an import links an added file whose name a popular import …
colbymchenry Oct 19, 2026
654a853
fix(react-router): read the table a function returns when a variable …
colbymchenry Oct 19, 2026
3695818
fix(sync): an import of a folder further up links its index file when…
colbymchenry Oct 19, 2026
1aebd3a
fix(react-router): a route that renders `<Outlet />` renders nothing …
colbymchenry Oct 19, 2026
b8f81e2
fix(js,ts): a function value imported from a package no longer links …
colbymchenry Oct 19, 2026
f862c96
merge: reconcile upstream through b8f81e2c
bompus Oct 19, 2026
f40b41f
Merge remote-tracking branch 'origin/fork/consolidated' into merge/up…
bompus Oct 19, 2026
bc1078e
fix(resolve): judge a base class's supertype where its class is writt…
bompus Oct 19, 2026
3da2d6b
fix(resolve): key the supertype cache by line, add /index.jsx to the …
bompus Oct 19, 2026
02828e7
fix(workspace): a workspace glob that leaves the project matches nothing
bompus Oct 19, 2026
25d159b
docs(changelog): file the workspace-glob note as a fork bullet
bompus Oct 19, 2026
d9a5883
docs(changelog): name the range variable in the Go String() example
bompus Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Follow [@getcodegraph](https://x.com/getcodegraph) on X for updates.

## About this fork

This is **bompus/codegraph**, a fork of [colbymchenry/codegraph](https://github.com/colbymchenry/codegraph). Its default branch, `fork/consolidated`, contains upstream `main` through [`baf19067`](https://github.com/colbymchenry/codegraph/commit/baf19067) (after v1.6.2) plus the fork's own work, and it takes upstream changes as they land. Changes that suit upstream are also offered there as pull requests.
This is **bompus/codegraph**, a fork of [colbymchenry/codegraph](https://github.com/colbymchenry/codegraph). Its default branch, `fork/consolidated`, contains upstream `main` through [`b8f81e2c`](https://github.com/colbymchenry/codegraph/commit/b8f81e2c) (after v1.6.2) plus the fork's own work, and it takes upstream changes as they land. Changes that suit upstream are also offered there as pull requests.

The fork publishes no releases. The install scripts, npm package, badges and `codegraph upgrade` further down this page install **upstream's** releases. To run the fork, build it from source (below).

Expand Down Expand Up @@ -159,6 +159,8 @@ Call resolution the fork adds:
- C++ object creation sees a header under a test directory, such as nlohmann/json's old-release copy in `tests/abi/`, only from inside that directory's tree or through an `#include`; upstream sees every header. A class declared in an included `.cc` file is the includer's too, and of two headers declaring one class the creation takes the one in its include closure.
- C# namespace `using` directives and `using` aliases apply only inside their enclosing namespace, not to sibling namespaces in the same file (`using static` is still file-wide, as upstream).
- A Java field declared with a qualified type (`outside.Repository`) keeps its qualifier, so calls through it never resolve to an unrelated project class with the same simple name.
- A Go call on a variable or constant whose declared type is a project type with no method of that name links to nothing; upstream falls back to a method of that name on some other type. A call whose receiver type the bindings read links at confidence 0.9, where upstream's text guess gives 0.65 to 0.8.
- A TypeScript or JavaScript field whose type is imported from a package that no `package.json` lists (a project with no manifest at all) links to no project class of that name; upstream matches it to a same-named project class.
- Python `super().method()` resolves along the class's C3 method resolution order, starting after the class itself. Upstream resolves it like `self.method()` and drops the link only when it lands on the calling method.
- Python receivers reassigned on later lines use the latest preceding value in their lexical scope. An unknown replacement leaves the member call unresolved. Calls and method values through a captured receiver stay unlinked when a later replacement makes its invocation-time value uncertain. Same-line replacements also stay unlinked when statement order cannot establish a reliable receiver type. Unaliased imports that add submodules to the same package preserve that package receiver.
- A `require` call creates no file dependency when a local binding shadows `require`.
Expand Down
23 changes: 22 additions & 1 deletion __tests__/explore-cross-call-dedup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,28 @@ describe('a second call against a real index', () => {
// Every file whose source the second call withheld carries a pointer, and
// the pointer names it.
expect(second).toContain(POINTER);
for (const [file, lines] of before) {
// Fork: a run shorter than EXPLORE_DEDUP.MIN_COVERED_LINES is re-served by
// design (a pointer for it would cost more than the lines). The fork's Go
// struct-field references leave a 7-line orphan window of
// `payslipstore.Store.Timesheet` in the first call, so only runs at least
// that long count as source the agent holds.
const heldRuns = (lines: Set<number>): Set<number> => {
const sorted = [...lines].sort((a, b) => a - b);
const held = new Set<number>();
let run: number[] = [];
const flush = () => {
if (run.length >= EXPLORE_DEDUP.MIN_COVERED_LINES) run.forEach((n) => held.add(n));
run = [];
};
for (const n of sorted) {
if (run.length > 0 && n !== run[run.length - 1]! + 1) flush();
run.push(n);
}
flush();
return held;
};
for (const [file, sent] of before) {
const lines = heldRuns(sent);
const repeated = [...(after.get(file) ?? [])].filter((n) => lines.has(n));
if (repeated.length === 0) continue;
// The only sanctioned repeat is the anti-abandonment restore, which fires
Expand Down
Loading
Loading