Version / commit
v8 @ 35adf43 (v0.9.76)
What happens
A PowerShell enum links its members to the enum with a contains edge, the same relation used for real declared members. Every other language that has enums emits a case_of edge per member — Java (#1719), C#, Swift, Rust, and VB.NET (#4054). PowerShell is now one of the last extractors still using contains for enum members.
Minimal reproduction
# status.ps1
enum Status {
Active
Paused
Closed
}
from graphify.extractors import extract_powershell
r = extract_powershell("status.ps1")
for e in r["edges"]:
if e["relation"] in ("case_of", "contains"):
print(e["relation"], e["source"], "->", e["target"])
Expected
Status -> Active/Paused/Closed as case_of.
Actual
Status -> Active/Paused/Closed as contains.
Why it matters
case_of targets are deliberately excluded from constructor binding (_member_nids in extract.py), so an enum member whose name collides with a type can currently be mistaken for a constructable member. It also breaks the cross-language invariant downstream consumers rely on to tell enum cases apart from declared members.
Version / commit
v8 @ 35adf43 (v0.9.76)
What happens
A PowerShell enum links its members to the enum with a
containsedge, the same relation used for real declared members. Every other language that has enums emits acase_ofedge per member — Java (#1719), C#, Swift, Rust, and VB.NET (#4054). PowerShell is now one of the last extractors still usingcontainsfor enum members.Minimal reproduction
# status.ps1 enum Status { Active Paused Closed }Expected
Status -> Active/Paused/Closedascase_of.Actual
Status -> Active/Paused/Closedascontains.Why it matters
case_oftargets are deliberately excluded from constructor binding (_member_nidsinextract.py), so an enum member whose name collides with a type can currently be mistaken for a constructable member. It also breaks the cross-language invariant downstream consumers rely on to tell enum cases apart from declared members.