Repository navigation
v0.23.3
On PyPI as cg-code-graph (pipx install cg-code-graph).
Added
- Swift: a call that leaves out a defaulted argument gets its own
CALLSedge to what the default calls, at the call site, withattrs.omits_default(the parameter label) andattrs.default_of.impacton the default's callee lists the callers that omit the argument (through an omitted default argument) and not those that pass it;callerslabels them(runs the default of gamut: in render)and the declaration edge(parameter default gamut:)(#212, Swift part).
Changed
impactandcallerscount selector-only candidates (receiver type unknown, #83) apart from resolved callers:transitive callers: 3 (+1 candidate),direct callers: 2 (2 sites); candidate callers: 1 (1 site, ...), andcallers_resolved/callers_candidatein the JSON. Candidates show their fan-out ((candidate, 1 of 3 methods named refreshStatus),candidate_ofin JSON) and are left out ofcallers by module. A caller without a module (a free function) is grouped as<file> (top level)instead of?(#204).- MCP
nodeprints neighbours as<id> :<line>, so a per-platform variant readsrefreshStatus@24 :12instead ofrefreshStatus@24@12(#201). - tree-sitter-swift 0.7.4 is supported (pin lifted to
<0.8):!Type.method()parses with the operator around the callee and is unwrapped; members after an unknown attribute macro parse without recovery. Every Swift fixture gives the same graph on 0.7.3 and 0.7.4; corpus differences are listed indocs/validation-log.md(#199, part).
Fixed
- Swift
#if/#elsevariants: a reference made where only some targets build (a macOS-only caller or call) links only the per-platform definitions built on one of those targets, so a macOS-only call no longer reaches the#elsestub and the stub no longer looks reached by macOS-only code. A reference whose definition is not built anywhere the site is moves to the sibling definition that is, and a#elsetype with noinitof its own uses its implicit initializer instead of being bound to a sibling variant'sinit, soplatform_divergencereports no false missing callee. References from code built everywhere still link every definition.callerscounts a site linked to several variants once (#201). - Swift exact mode keeps the
default_argmark on a parameter default's call, soimpactdoes not walk the declaring function as an unconditional caller (#208).
Full changelog: v0.23.2...v0.23.3