-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add C# tree-sitter grammar wasm for indexing and .slnx for detection #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Greptile Summary
Important Files Changed
Confidence score: 3/5
Sequence DiagramsequenceDiagram
participant User
participant "Matrix Plugin"
participant "Project Detector"
participant Indexer
participant "Grammar Downloader"
participant "unpkg CDN"
participant "File System"
User->>+"Matrix Plugin": "Index C# project"
"Matrix Plugin"->>+"Project Detector": "detectProjectTypes(cwd)"
"Project Detector"->>+"File System": "Check for *.csproj, *.sln, *.slnx"
"File System"-->>-"Project Detector": "C# project markers found"
"Project Detector"-->>-"Matrix Plugin": "C# project detected"
"Matrix Plugin"->>+Indexer: "Start C# indexing"
Indexer->>+"Grammar Downloader": "downloadGrammar('tree-sitter-c-sharp.wasm')"
"Grammar Downloader"->>+"File System": "Check cache ~/.claude/matrix/grammars/"
"File System"-->>-"Grammar Downloader": "Grammar not cached"
"Grammar Downloader"->>+"unpkg CDN": "Fetch tree-sitter-c_sharp.wasm"
"unpkg CDN"-->>-"Grammar Downloader": "WASM binary"
"Grammar Downloader"->>+"File System": "Cache grammar file"
"File System"-->>-"Grammar Downloader": "Grammar cached"
"Grammar Downloader"-->>-Indexer: "Grammar path"
Indexer->>+Indexer: "Parse C# files with grammar"
Indexer-->>-"Matrix Plugin": "Indexing complete"
"Matrix Plugin"-->>-User: "C# project indexed successfully"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
| 'tree-sitter-cpp.wasm': 'https://unpkg.com/tree-sitter-cpp@0.23.4/tree-sitter-cpp.wasm', | ||
| 'tree-sitter-ruby.wasm': 'https://unpkg.com/tree-sitter-ruby@0.23.1/tree-sitter-ruby.wasm', | ||
| 'tree-sitter-php.wasm': 'https://unpkg.com/tree-sitter-php@0.24.2/tree-sitter-php.wasm', | ||
| 'tree-sitter-c-sharp.wasm': 'https://unpkg.com/tree-sitter-c-sharp@0.23.1/tree-sitter-c_sharp.wasm', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Filename key uses hyphen ('c-sharp') but URL path uses underscore ('c_sharp'). This mismatch will cause download failures when the C# grammar is requested.
| 'tree-sitter-c-sharp.wasm': 'https://unpkg.com/tree-sitter-c-sharp@0.23.1/tree-sitter-c_sharp.wasm', | |
| 'tree-sitter-c-sharp.wasm': 'https://unpkg.com/tree-sitter-c-sharp@0.23.1/tree-sitter-c-sharp.wasm', |
Should the key be 'tree-sitter-c_sharp.wasm' to match the URL, or should the URL use hyphens?
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/indexer/languages/download.ts
Line: 29:29
Comment:
**logic:** Filename key uses hyphen ('c-sharp') but URL path uses underscore ('c_sharp'). This mismatch will cause download failures when the C# grammar is requested.
```suggestion
'tree-sitter-c-sharp.wasm': 'https://unpkg.com/tree-sitter-c-sharp@0.23.1/tree-sitter-c-sharp.wasm',
```
Should the key be 'tree-sitter-c_sharp.wasm' to match the URL, or should the URL use hyphens?
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL is currently in correct format. c-sharp returns incorrect uri. The proper format in this instance is c_sharp
|
@JacobRWebb thanks for this contribution! Could you add a changelog entry? ---CHANGELOG.md [2.1.2] - 2025-01-18Added
the release CI won't trigger without a changelog entry |
Summary