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
docs: add deep extraction commit to contribution guide
Add commit 8 (deep extraction improvements) with detailed description
of C#, F#, and Razor changes. Update test results with final metrics
showing 1058-node main component and 2177 edges.
Made-with: Cursor
Copy file name to clipboardExpand all lines: FSHARP_CONTRIBUTION_GUIDE.md
+42-11Lines changed: 42 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,15 +87,43 @@ Adds a post-extraction pass that resolves F# `open` import targets to actual fil
87
87
88
88
---
89
89
90
-
##Suggested PR Strategy
90
+
### 8. `478bdcb` — fix: deep extraction improvements for C# and F#
91
91
92
-
1.**PR 1 (Commits 1 + 2):** "Add F# language support" — the main feature. Blocked on tree-sitter-fsharp PyPI availability.
93
-
2.**PR 2 (Commit 3):** "Add BCL method blocklist to cross-file inference" — independent quality fix, can be submitted immediately.
94
-
3.**PR 3 (Commit 4):** "Fix node ID collisions across same-name files" — independent quality fix, can be submitted immediately.
95
-
4.**PR 4 (Commit 5):** "Merge stub nodes with real cross-language definitions" — general improvement, can be submitted immediately.
96
-
5.**PR 5 (Commit 6):** "Resolve F# open statements to source files" — depends on PR 1.
92
+
**Files:**`graphify/extract.py`
93
+
**PR scope:** Independent improvement, benefits all .NET languages
94
+
**Depends on:** Commits 2, 7
95
+
96
+
Multiple fixes to the C#, F#, and Razor extractors:
97
+
98
+
**C# improvements:**
99
+
- Add `object_creation_expression` to `call_types` (`new Type()` → edge to the created type)
100
+
- Extract generic type arguments from `invocation_expression` (`AddDbContext<BookDbContext>()` → edge to `BookDbContext`)
101
+
- Walk `constructor_declaration` bodies for call graph extraction via `_csharp_extra_walk`
102
+
- Walk `global_statement` (top-level C# code in `Program.cs`) for calls (`app.UseMiddleware<ApiKeyMiddleware>()` → edge to `ApiKeyMiddleware`)
103
+
104
+
**F# improvements:**
105
+
- Fix `member_defn` body extraction: find body after `=` token instead of `child_by_field_name("body")` which returns `None` for F# members. This was causing all member method bodies to be invisible to call-graph analysis.
106
+
- Extract root identifier from `dot_expression` chains (`PipelineMetrics.counter.Add()` → edge to `PipelineMetrics` module)
107
+
108
+
**Razor improvements:**
109
+
- Extract generic type arguments from `@code` blocks (`ShowDialogAsync<SubmitBookDialog>()` → edge to `SubmitBookDialog`)
110
+
- Extract `new Type()` patterns from `@code` blocks
111
+
112
+
**Impact:** Previously disconnected clusters (BookDbContext, ChapterStore, PageGistStore, BookProcessingHub, BkdWebApplicationFactory, PipelineMetrics, ApiKeyMiddleware, SubmitBookDialog) all joined the main component. Main component grew from 995 to 1058 nodes.
113
+
114
+
---
115
+
116
+
## Updated PR Strategy
117
+
118
+
1.**PR 1 (Commits 1 + 2):** "Add F# language support" — blocked on tree-sitter-fsharp PyPI.
0 commit comments