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
Copy file name to clipboardExpand all lines: FSHARP_CONTRIBUTION_GUIDE.md
+81-60Lines changed: 81 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,49 @@
1
-
# F# Support for Graphify — Contribution Guide
1
+
# F#, Razor/Blazor & Cross-Language Improvements for Graphify
2
2
3
-
This document describes the changes made on branch `fix/fsharp-graph-quality` to add F# language support to graphify and fix several cross-language graph quality issues. Each commit is designed to be cherry-picked independently for separate upstream PRs.
3
+
This document describes the changes made on branch `fix/fsharp-graph-quality` to add F# and Razor/Blazor language support to graphify and fix several cross-language graph quality issues. Each commit is designed to be cherry-picked independently for separate upstream PRs.
4
4
5
-
## Prerequisites
5
+
## Upstream Contributions
6
6
7
-
Before these changes can be upstreamed, the [tree-sitter-fsharp](https://github.com/ionide/tree-sitter-fsharp) project needs to publish Python bindings to PyPI. Currently, `tree-sitter-fsharp` has `"python": false` in its `tree-sitter.json` and no PyPI package exists. The grammar itself works (v0.3.0), and Python bindings can be built locally from source using `setup.py` (see below).
7
+
### Forks
8
8
9
-
Once `tree-sitter-fsharp` is on PyPI, it can be added to graphify's optional dependencies just like other language grammars.
|[#439](https://github.com/safishamsi/graphify/issues/439)|[#442](https://github.com/safishamsi/graphify/pull/442)|`fix/merge-stub-nodes`| Merge stub nodes with real cross-language definitions | Awaiting review |
24
+
25
+
**tree-sitter-razor** — 1 bug fix PR:
26
+
27
+
| Issue | PR | Branch | Description | Status |
28
+
|-------|----|--------|-------------|--------|
29
+
|[#18](https://github.com/tris203/tree-sitter-razor/issues/18)|[#19](https://github.com/tris203/tree-sitter-razor/pull/19)|`fix/python-scanner`| Include `scanner.c` in Python bindings `setup.py`| Awaiting review |
30
+
31
+
**tree-sitter-fsharp** — 1 feature request:
32
+
33
+
| Issue | Description | Status |
34
+
|-------|-------------|--------|
35
+
|[#176](https://github.com/ionide/tree-sitter-fsharp/issues/176)| Publish Python bindings to PyPI | Awaiting response |
36
+
37
+
### Blocked PRs (not yet submitted)
38
+
39
+
| Commits | Description | Blocked on |
40
+
|---------|-------------|------------|
41
+
| 1 + 2 | F# language support | tree-sitter-fsharp PyPI ([#176](https://github.com/ionide/tree-sitter-fsharp/issues/176)) |
Adds a blocklist of ~120 common .NET BCL/framework method names (`Contains`, `Equals`, `ToString`, `Where`, `Select`, `ListAsync`, `CreateDbContext`, etc.) that are skipped during cross-file call resolution.
48
86
@@ -56,6 +94,7 @@ Adds a blocklist of ~120 common .NET BCL/framework method names (`Contains`, `Eq
56
94
57
95
**Files:**`graphify/extract.py`
58
96
**PR scope:** Independent improvement, benefits all languages
Adds a post-extraction pass that detects when multiple files produce nodes with the same ID (because `_make_id(stem, name)` uses only the file stem). When collisions are found, the parent directory name is prepended to disambiguate.
61
100
@@ -69,6 +108,7 @@ Adds a post-extraction pass that detects when multiple files produce nodes with
Adds a post-extraction pass that merges stub nodes (empty `source_file`) with real definitions by matching labels. Prioritizes definition files (`Interfaces.fs`, `Domain.fs`, `Types.fs`, `Contracts.fs`, `Abstractions.fs`).
74
114
@@ -87,6 +127,33 @@ Adds a post-extraction pass that resolves F# `open` import targets to actual fil
87
127
88
128
---
89
129
130
+
### 7. `337f088` — feat: add Razor/Blazor extractor with tree-sitter-razor
Tested on a mixed F#/C#/Blazor project (BooksKnowledgeDistillation):
243
+
Tested on a mixed F#/C#/Blazor project (BooksKnowledgeDistillation, 141 code files):
225
244
226
245
| Metric | Before | After all fixes |
227
246
|--------|--------|-----------------|
228
247
| Nodes | 1055 | 1127 |
229
248
| Edges | 1699 | 2177 |
230
249
| INFERRED edges | 538 | 362 |
231
-
| Communities | 57 | 44 |
250
+
| Communities | 57 | 44 (all labeled) |
232
251
| Isolated (degree=0) | 119 | 3 |
233
252
| Main component | 915 | 1058 |
234
253
| Disconnected components | 24 | 20 |
@@ -240,3 +259,5 @@ Tested on a mixed F#/C#/Blazor project (BooksKnowledgeDistillation):
240
259
| BookDbContext | disconnected | in main component |
241
260
| PipelineMetrics | disconnected | in main component |
242
261
| ApiKeyMiddleware | disconnected | in main component |
262
+
263
+
The remaining 20 disconnected components are genuinely isolated code: Python utility scripts, JavaScript files, test classes without external references, unused Blazor components, and legacy code.
0 commit comments