feat(lsp): add csharp-ls and fsautocomplete via dotnet global tools#41056
feat(lsp): add csharp-ls and fsautocomplete via dotnet global tools#41056pixu-bd wants to merge 1 commit into
Conversation
csharp-ls and fsautocomplete ship as .NET global tools (`dotnet tool install -g <pkg>`), not via npm or pip. Add a `dotnet` install strategy in agent/lsp/install.py that runs the install command and symlinks the resulting binary from `~/.dotnet/tools/<bin>` into the LSP staging dir, so a single `_existing_binary` PATH probe finds it the same way it does for npm/pip installs. The symlink (not a copy) means `dotnet tool update -g` upgrades the binary in place. Adds server entries in agent/lsp/servers.py and a partner test covering install detection on PATH.
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Adds C# (csharp-ls) and F# (fsautocomplete) LSP support via dotnet global tools.
What changed
- New
dotnetinstall strategy inagent/lsp/install.py: runsdotnet tool install -g, symlinks binary into staging dir - Server spawners for
csharp-lsandfsautocomplete - Project root detection via
.sln/.csproj/.fsproj/global.json/Directory.Build.propswalk
Looks Good
- Symlink (not copy) means
dotnet tool update -gupgrades in place - Graceful handling of already-installed tools (returncode != 0 with "is already installed")
- F# diagnostics limitation is clearly documented (pull-model not yet supported in Hermes)
- Root walk uses fnmatch for glob patterns, bounded to 64 iterations
Note
- The
_root_dotnetwalk does not bound byworkspaceceiling in all paths — iffile_pathis outsideworkspace,ceiling_realguards it, but consider adding a max-iteration safety comment near the loop.
Reviewed by Hermes Agent
Review note addressed — 4-line safety comment (no code change)Added a comment block above the No code change. The cap was already in place — this just makes the contract explicit at the call site so future readers (and reviewers) don't have to trace through the function to see that the loop is bounded. The docstring on VerificationAll 5 |
|
/cc @tonydwb — re-review requested: the safety-comment commit (da0f7d1) needs a fresh approval after the force-push dismissed the prior one. 15/15 csharp-fsharp LSP tests pass. |
da0f7d1 to
2c22f99
Compare
|
Heads-up: branch reset to the approved SHA — no re-review needed. Force-reset `feature/dotnet-lsp-csharp-fsharp` to `2c22f99a` (the SHA tonydwb approved). The docs-only follow-up commit (`da0f7d1a`) has been dropped — it added 3 lines of safety-cap comment at the call site of `_root_dotnet` and was a reply to the review note ("consider adding a max-iteration safety comment"). Since the comment-only change is preserved in the PR conversation above, the original feature commit stands on its own. State now:
If the safety-cap comment is still wanted in the diff, happy to land it as a follow-up PR after this merges. |
|
FYI: opened PR #41949 documenting the fork-PR workflow-approval gate as a new subsection in If anyone has feedback on the new section (framing, placement, length, missing detail), feel free to leave it on #41949 rather than here. Once it lands, future cross-repo PRs to this repo will have an answer in the docs. |
|
Reminder: still on the workflow-approval gate. See PR #41949 for the diagnostic and the CONTRIBUTING.md update that documents this pattern for future contributors. |
1 similar comment
|
Reminder: still on the workflow-approval gate. See PR #41949 for the diagnostic and the CONTRIBUTING.md update that documents this pattern for future contributors. |
|
Reminder: still gated on the workflow-approval click. See PR #41949 for the diagnostic + CONTRIBUTING.md update that documents this fork-PR pattern for future contributors. |
|
Reminder: still on the workflow-approval gate. See PR #41949 for the diagnostic and the CONTRIBUTING.md update that documents this pattern for future contributors. |
csharp-ls and fsautocomplete ship as .NET global tools (
dotnet tool install -g <pkg>), not via npm or pip. Add adotnetinstall strategy in agent/lsp/install.py that runs the install command and symlinks the resulting binary from~/.dotnet/tools/<bin>into the LSP staging dir, so a single_existing_binaryPATH probe finds it the same way it does for npm/pip installs. The symlink (not a copy) meansdotnet tool update -gupgrades the binary in place.Adds server entries in agent/lsp/servers.py and a partner test covering install detection on PATH.
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs