Repository navigation
Conversation
7e98bde to
e8c3461
Compare
|
Follow-up audit against current v8 found that JavaScript member-expression parents such as class Dog extends ns.Animal were still dropped. The branch now handles that AST shape and adds a regression test. Current validation: tests/test_ts_inheritance.py 9 passed; Ruff and git diff --check passed. |
e8c3461 to
da59be9
Compare
|
Precision follow-up: I removed the member-expression tail normalization mentioned in my previous comment. Treating ns.Animal as bare Animal can falsely bind an unrelated same-file class without namespace-aware resolution. The final branch stays focused on direct JavaScript heritage identifiers, adds imported-class coverage and a runtime-expression negative control, and is squashed to one commit. |
A plain JavaScript `class Dog extends Animal` produced no inherits edge — only the TypeScript extends_clause/implements_clause shapes were handled, not the bare identifier directly under class_heritage that JS emits. Fall back to reading heritage identifiers when no clause is present, so JS class inheritance is captured; a dynamic base (mixin call) yields nothing and TS is not double-emitted.
Ships two batches: the robot/defang/watch/semantic-guard set — Robot Framework extractor (#3192), generalized control-token defang (#3183), watch unresolved-link preservation (#3190), unverified-semantic-loss guard (#3203), hook-guard search detection (#3121), stale-SKILL.md backup (#3144), report/wiki count fixes (#3148/#3127); and a rescued batch of @Synvoya cross-language inheritance-edge corrections (JS #1790, PHP #1791, Scala #1792/#1794, Kotlin #1793, C# #1817, Go #1818) that had been buried in the backlog for ~7 weeks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Shipped in v0.9.53 via authorship-preserving cherry-pick so you keep contributor-graph credit. Thanks @Synvoya — this was verified still-live on the current tree and landed as part of a cross-language heritage-edge batch. Release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.53 |
Bug
Plain JavaScript class heritage was dropped:
class Dog extends Animal {}emitted noinheritsedge, while the equivalent TypeScript did.Root cause
The JavaScript grammar stores
extendsand its identifier directly underclass_heritage. TypeScript wraps the base in anextends_clause. The walker only handled the wrapped shape.Fix
When a
class_heritagenode has noextends_clauseorimplements_clause, treat the heritage node itself as the JavaScript extends clause. The guard preserves the existing TypeScript path and prevents duplicate edges.The implementation remains precision-first: direct same-file and imported identifiers resolve; runtime expressions such as
extends mixin(Animal)are not converted into fabricated static inheritance. Qualified member expressions require namespace-aware resolution and remain outside this focused fix.Validation
tests/test_ts_inheritance.py: 10 passed.git diff --check: passed.