Environment
- graphify 0.9.49 (PyPI
graphifyy), Linux, Python 3.12
graphify extract <service> --code-only --no-cluster
Summary
C# enum members are not extracted as nodes. enum_declaration is in _CSHARP_CONFIG.class_types, so the enum type gets a node, but nothing under it does, and the type sits in the graph as a leaf with no outgoing edges.
This is the same gap #1700 reported for Kotlin/Java, fixed for Java in #1719 and Kotlin in #1738. Swift emits case_of for enum_entry, and PowerShell enum members landed in 0.9.49 via #3002. C# was not brought along.
Reproducer
// ProcessingType.cs
namespace Catalog.Events;
public enum ProcessingType
{
Process = 0,
ProcessAndCompleteIndex = 1
}
Current behavior (0.9.49)
processingtype (file)
csharp_namespace:9b597bd1e93a863b (namespace)
processingtype_catalog_events_processingtype (enum type, no children)
Process and ProcessAndCompleteIndex are nowhere in the node table, and the enum node has zero outgoing edges.
Measured on a 7-service .NET corpus (42,645 nodes / 98,269 edges): zero case_of edges, and the enum types I checked (ProcessingType, EntityType, ProductType, VariantType) are all leaves.
Expected
The Java shape, applied to C#:
processingtype_catalog_events_processingtype --case_of--> ..._processingtype_process
processingtype_catalog_events_processingtype --case_of--> ..._processingtype_processandcompleteindex
Why it matters here
In this corpus enum values are dispatch keys, not decoration. A consumer branches on EntityType to decide which id-resolution path to take, and a bulk index run is finished by one specific ProcessingType value. Asking the graph "which value completes the index run" currently cannot even surface that the value exists, because the name is not in the node table.
Same as #1700 concluded: even without a usage edge, having the member as a searchable node lets you find the definition and fall back to text search for the uses.
Note on grammar
The walk already reaches the members. enum_declaration's body field resolves to enum_member_declaration_list, whose children are enum_member_declaration nodes carrying a name field, and the C# class handler descends into the body with the enum as parent_class_nid. There is just no handler for that node type.
One C#-specific wrinkle: the language is case-sensitive, so enum E { Value, value } is legal while normalize_id casefolds, which means both members compete for one id.
I have a patch and will open it against this.
Environment
graphifyy), Linux, Python 3.12graphify extract <service> --code-only --no-clusterSummary
C# enum members are not extracted as nodes.
enum_declarationis in_CSHARP_CONFIG.class_types, so the enum type gets a node, but nothing under it does, and the type sits in the graph as a leaf with no outgoing edges.This is the same gap #1700 reported for Kotlin/Java, fixed for Java in #1719 and Kotlin in #1738. Swift emits
case_offorenum_entry, and PowerShell enum members landed in 0.9.49 via #3002. C# was not brought along.Reproducer
Current behavior (0.9.49)
ProcessandProcessAndCompleteIndexare nowhere in the node table, and the enum node has zero outgoing edges.Measured on a 7-service .NET corpus (42,645 nodes / 98,269 edges): zero
case_ofedges, and the enum types I checked (ProcessingType,EntityType,ProductType,VariantType) are all leaves.Expected
The Java shape, applied to C#:
Why it matters here
In this corpus enum values are dispatch keys, not decoration. A consumer branches on
EntityTypeto decide which id-resolution path to take, and a bulk index run is finished by one specificProcessingTypevalue. Asking the graph "which value completes the index run" currently cannot even surface that the value exists, because the name is not in the node table.Same as #1700 concluded: even without a usage edge, having the member as a searchable node lets you find the definition and fall back to text search for the uses.
Note on grammar
The walk already reaches the members.
enum_declaration'sbodyfield resolves toenum_member_declaration_list, whose children areenum_member_declarationnodes carrying anamefield, and the C# class handler descends into the body with the enum asparent_class_nid. There is just no handler for that node type.One C#-specific wrinkle: the language is case-sensitive, so
enum E { Value, value }is legal whilenormalize_idcasefolds, which means both members compete for one id.I have a patch and will open it against this.