You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apex: class heritage clause stops at a dot — implements Database.Batchable<sObject>, Schedulable fabricates a Database node and drops Schedulable #3277
extends (\w+) and implements ([\w,\s]+) both stop at the first ., so a namespace-qualified base type is truncated to its namespace. Two consequences, both silent:
A node is fabricated for the namespace (Database, Outer) and the heritage edge points at it — a namespace is not a type, and the real base type gets no node at all.
Because the capture stops at the dot, it never reaches the comma, so every remaining interface in the list is dropped.
This is the same class of gap as #3217 (fixed for method return types in #3276), but in a different regex — that PR deliberately leaves this one alone.
Affected versions
Present in 0.9.53 / HEAD (33362d9), in graphify/extractors/apex.py.
Minimal repro
Batch.cls:
public with sharing classBatchimplementsDatabase.Batchable<sObject>, Schedulable {
publicvoidexecute(Database.BatchableContextbc) { }
}
Expected: the heritage target is the qualified type (Database.Batchable, Outer.BaseThing) — or at minimum its tail type name, matching the treatment Kotlin (#1793) and Scala (#1794) received — and Schedulable keeps its own implements edge.
Why it matters
implements Database.Batchable<sObject>, Schedulable is the canonical shape of every scheduled batch job in Salesforce, so this is not an edge case in a real Apex org. The fabricated Database node is also a mild hub-pollution problem: every batch class in the repo points at the same meaningless node.
Note on generics in the list
A correct fix needs to split the interface list on top-level commas only, since a generic argument can itself contain one (Map<String, Object>); splitting on every comma would shred it. Happy to open a PR if the approach sounds right.
Activity
fix(apex): resolve a qualified heritage clause to its tail type (Grap…