Repository navigation
Conversation
Retain direct method signatures on named structural aliases and use typed receiver resolution without adding bare-name bindings. Co-authored-by: Codex <[email protected]>
|
Thanks for the pull request, @rvitaliy. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
No issues reported · High impact
The change extracts direct method signatures from named TypeScript object aliases, including supported Readonly wrappers.
What this review covered
- We didn't review 1 file that isn't source code, such as docs, config, images, or generated or third-party code.
- Some lookups asked for files or lines that do not exist; the review was told and carried on.
- One review pass used all of its turns for reading code, so it reported from what it had already read.
- 5 of 5 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 6496 functions depend on this change
- 3 functions became more coupled.
extract()(1351 callers),extract_js()(104 callers),walk()(1 callers). - 621 of 621 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 6186232 · 1 of 1 earlier findings resolved · 4 earlier findings not re-checked
Limit shadowing to the alias scope and cover imported receivers and heritage lookup. Co-authored-by: Codex <[email protected]>
|
Shipped in v0.9.121, landed via authorship-preserving cherry-pick so your commits keep your name. Thanks @rvitaliy! |
|
Thanks for shipping #5456 in v0.9.121 and preserving the authorship, @safishamsi! I noticed one side effect of the cherry-pick workflow. GitHub didn’t close the linked issue when the fix landed, so I closed #5455 manually. #5464 is another example. Its fix shipped in the same release, and the issue is still open. With 800+ open issues, some reports may already have shipped fixes. Could we include |
What does this PR do?
Fixes #5455.
type Port = { read(): number }andtype Port = Readonly<{ read(): number }>now produce a method node and an ownership edge, with the signature's original source location. Typed receivers use the existing TypeScript resolver. The signatures stay out of bare-call, static-call, and module-symbol lookup.Type of change
Verification & Invariants
CONTRIBUTING.md..tsand.tsxand added regression tests.ARCHITECTURE.md.Readonlyunwrapping is limited to an unqualified inline object argument when no local type binding shadowsReadonlyin the alias’s scope. The regression tests include unrelated generic parameters, private and exported names in reopened namespaces, calls through imported type aliases, and inheritance with or without the base declaration in the extracted files. The AST cache schema advances to 54 so an existing watch graph is rebuilt with the new declarations.How was this tested?
The issue's code-only CLI reproduction reports
read()under all three types. The full suite passed on both Python 3.11.18 and 3.13.17 (11,880 parallel and 20 serial tests passed on each, with 134 skips and one expected failure). The Python 3.11 run used a separate environment from the same frozen lockfile. A Pyright comparison for the changed Python files found the same 226 existing diagnostics as upstreamv8.Graphify-specific checklist