Repository navigation
Description
C# is the only language with a class-shaped type layer whose state is missing from the graph. A field or property produces a references edge to its type and never a node of its own, so nothing in the graph can point at a member.
public class Variant {
public bool IsShowCategory { get; set; }
public void Touch() { }
}Nodes: Variant, .Touch(). Edges: Variant method .Touch(). IsShowCategory is absent.
What the other languages do
Checked by running them, not by reading the configs:
| language | member | relation |
|---|---|---|
| C++ | data member | defines |
| C | struct field | defines (in flight, #2971) |
| Swift | computed / observed property | function-like member node (#2220) |
| Swift | enum case | case_of |
| Java | enum constant | case_of |
| JS/TS | class field | method when callable |
| C# | field, property | nothing |
#2971's argument for C is the one that applies: the struct is C's primary data-modeling construct, so dropping it erased the type layer. Properties are C#'s.
Properties, not fields
ids.normalize_id casefolds and strips leading underscores, so _count and Count are the same id. Emitting both hands the node to whichever the parser reaches first, which is the private backing field, and the public member disappears behind it. In C# the property is the state's public identity, so it is the half worth having, and fields stay out until the id question has an answer.
Cost
On a 1457-file .NET service: 9925 -> 14683 nodes and 29547 -> 34182 edges, +48% and +16%. It is a DTO-heavy corpus, which is where the ratio comes from. The added nodes are leaves, so the hub structure does not move.
Patch in #3010.
Not this issue
A member node on its own does not answer "which code fills this member", because no language in the tree has a member-level usage edge. That is #3012, and it is a design question rather than a gap: it would be the first of its kind here.
Related
- Swift: computed properties emit no node — erases the entire SwiftUI view layer (var body is a computed property) #2181 and fix(swift): extract computed & observed properties (#2181) #2220 added Swift computed-property nodes.
- fix(c): extract structs and their fields instead of dropping the whole type layer #2971 is adding C struct field nodes.
- fix(csharp): emit type references for properties #1591 added C# property type references, which is what exists today.
- C#: generic type arguments are dropped in field and call-site position (captured in property/return/parameter) #2911 concerns generic arguments in the same field and property position.
- Go: case-only sibling symbols (
Run/run) collapse to one node id — the unexported half vanishes and its call sites bind to a same-named function in another package #2779 and JS/TS/Python: distinct same-file symbols still collapse after ID normalization in v0.9.45 #2810 are the id-normalization collisions that keep fields out of this patch.
Activity
durmazoguzhan commentedon Aug 24, 2026
Putting the branch behind this where it can be read, since the issue claims a patch exists and there was no way to check that: durmazoguzhan/graphify@feat-csharp-member-nodes. Thirty three lines in the C# field and property branches, mirroring the C++ field emission.
Deliberately not a PR. On its own it is +5564 nodes on a 9925-node graph and
explainon a property name comes back with seven ambiguous leaves, so the cost lands before any of the value does. It goes up properly once there is an answer on the three questions above, in particular whether the node set should be narrowed to members something actually touches, and it wants tests either way.feat(csharp): emit a node per field and property (Graphify-Labs#3006)
durmazoguzhan commentedon Aug 24, 2026
Changing my position on half of this, and the reason is worth writing down.
I opened this asking about both halves at once, which was wrong. They are not in the same position:
The declaration half is not new ground. I went through what each language emits rather than reading the configs, and member nodes are settled: C++ emits a node per data member with
defines, #2971 is adding the same for C structs on exactly this argument, #2220 gave Swift computed properties nodes, Swift enum cases and Java enum constants getcase_of, JS/TS class fields getmethodwhen callable. C# is the outlier, not the pioneer. So that half is a PR, not a question: #3010, with the same relation andcontext="field"the C++ branch uses, and the cost stated (+56% nodes on a DTO-heavy corpus, leaves only, god nodes unmoved).The usage half is new ground, and now I can say that with evidence rather than impression. Every language stops at the container:
Nothing anywhere points at a member. So the three questions in the issue narrow to the ones that are actually open:
readsandwritesas separate relations or one with a context, whether the member node set should be narrowed to members something touches (which would reverse the order and make #3010 the follow-up), and whether this is C#-only or the existing member layers in C++ and Swift grow usage edges too.Leaving this issue open for that. #3010 stands on its own either way.
[-]C#: fields and properties are not nodes, so no edge can point at a member[/-][+]C#: properties are not nodes, so nothing in the graph can point at a member[/+]durmazoguzhan commentedon Aug 24, 2026
Rewrote the description above and split the issue, because bundling both halves here was the wrong call and made the PR reference awkward.
The scope also narrowed while I was fixing the review finding on #3010: properties only, no fields, because
ids.normalize_idfolds_countandCountinto one id and emitting both lets the private backing field take the public member's node.feat(csharp): emit a member node per property (#3006)
chore: bump to 0.9.49
safishamsi commentedon Aug 24, 2026
Fixed in v0.9.49: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.49. Closing as resolved.
fix(csharp): resolve a member access to the receiver type's property (G…
fix(csharp): resolve a member access to the receiver type's property (G…
fix(csharp): resolve a member access to the receiver type's property (G…
fix(csharp): resolve a member access to the receiver type's property (G…
fix(csharp): resolve a member access to the receiver type's property (G…