Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 30, 2025

Summary

This PR fixes issue #5238 where .NET projects were not being properly indexed because the codebase indexing system only supported C# files.

Changes Made

  • Added Visual Basic .NET (.vb) extension support - VB.NET files are now included in indexing
  • Added F# (.fs, .fsx, .fsi) extension support - All F# file types are now supported
  • Added appropriate parser mappings - VB.NET uses C# parser, F# uses OCaml parser (since F# is based on OCaml)
  • Added comprehensive test coverage - New test file ensures all .NET extensions are properly supported

Technical Details

The changes were made to two key files:

  1. - Added new extensions to the main extensions array
  2. - Added parser mappings for the new file types

The file automatically includes all extensions from tree-sitter (except markdown), so no changes were needed there.

Testing

  • ✅ All existing tests pass
  • ✅ New comprehensive test for .NET extension support passes
  • ✅ Verified that all .NET extensions are included in both and arrays

Impact

This resolves the indexing issue for .NET projects, allowing users to:

  • Search and navigate VB.NET code
  • Search and navigate F# code
  • Use all codebase indexing features with mixed .NET projects

Fixes #5238


Important

Add support for .NET file extensions (.vb, .fs, .fsx, .fsi) in codebase indexing, mapping them to appropriate parsers and adding tests.

  • Behavior:
    • Adds support for .NET file extensions: .vb, .fs, .fsx, .fsi in index.ts.
    • Maps .vb to C# parser and .fs, .fsx, .fsi to OCaml parser in languageParser.ts.
  • Testing:
    • New test dotnet-support.spec.ts ensures .NET extensions are included in extensions and scannerExtensions arrays.
  • Impact:
    • Resolves indexing issues for .NET projects, enabling search and navigation for VB.NET and F# code.

This description was created by Ellipsis for 052628e. You can customize this summary. It will automatically update as commits are pushed.

- Added Visual Basic .NET (.vb) extension support
- Added F# (.fs, .fsx, .fsi) extension support
- Added appropriate parser mappings for VB.NET and F# files
- Added comprehensive test coverage for .NET extension support

This resolves the issue where .NET projects were not being properly indexed
because only C# files were supported. Now all common .NET file types are
included in the codebase indexing system.
@roomote roomote requested review from cte, jr and mrubens as code owners June 30, 2025 10:36
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jun 30, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jun 30, 2025

No security or compliance issues detected. Reviewed everything up to 052628e.

Security Overview
  • 🔎 Scanned files: 3 changed file(s)
Detected Code Changes

The diff is too large to display a summary of code changes.

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 30, 2025
@adamhill
Copy link
Contributor

C# is not a good proxy for VB.NET and OCaml is not even remotely a good proxy for F# :-)

F# uses indentation for code blocks OC uses the in let match keywords and ; 's

There is an actual t-s grammar for F# but would take @cte or @KJ7LNW level experience to add them to the WASM directory and integrate queries and tests (or maybe the expensive version of Opus)

https://github.com/ionide/tree-sitter-fsharp

@KJ7LNW
Copy link
Contributor

KJ7LNW commented Jun 30, 2025

See https://github.com/RooCodeInc/Roo-Code/tree/main/src/services/tree-sitter/__tests__

  1. First add inspect<Language>.test.ts
  2. then add parseSourceCodeDefinitions.<language>.spec.ts (must be second, do item 1 first)

@adamhill
Copy link
Contributor

adamhill commented Jul 1, 2025

How hard is adding a new WASM going to be?

I notice that the Copilot chat extensions now uses a prebuilt repo of WASM's
From the code in
https://github.com/microsoft/vscode-tree-sitter-wasm/blob/main/build/main.ts
it doesn't look too hard to add using a system like this.

@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Codebase indexing doesnt work with dotnet

5 participants