Fix connector cross-platform dotnet-host lookup and win-x64-hardcoded packaging - #21
Merged
Merged
Conversation
… packaging OutProcReqnrollConnector resolved the dotnet host via Windows-only Program Files env vars and a hardcoded "dotnet.exe", so every net6.0+ discovery call would fail to launch on a non-Windows LSP server. Separately, the connector's staged build output was copied into a literal ".../win-x64/Connectors/..." path regardless of which RID the server was actually being published for, so linux-x64/osx-x64/osx-arm64 publishes silently shipped without any connectors. Thread the server's RuntimeIdentifier through to the connector build (while clearing RuntimeIdentifier/SelfContained for that nested build, since the connector itself stays a framework-dependent per-TFM build) so packaging matches the RID actually being published, and branch the dotnet host lookup on OperatingSystem.IsWindows() with a DOTNET_ROOT/PATH fallback for Linux/macOS. Fixes #19. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OutProcReqnrollConnectorresolved thedotnethost via Windows-only Program Files env vars and a hardcodeddotnet.exe, so every net6.0+ discovery call would fail to launch on a non-Windows LSP server. Now branches onOperatingSystem.IsWindows(), falling back toDOTNET_ROOT/PATH-resolveddotneton Linux/macOS..../win-x64/Connectors/...path regardless of the RID the server was actually published for, solinux-x64/osx-x64/osx-arm64publishes silently shipped with no connectors at all. The server'sRuntimeIdentifieris now threaded through to the connector build (via a new_ConnectorServerRidproperty), whileRuntimeIdentifier/SelfContainedare explicitly cleared for that nested build since the connector itself must stay a framework-dependent, per-TFM build.Fixes #19.
Test plan
dotnet buildof the server project for the defaultwin-x64RID still succeeds and stages connectors correctly.dotnet build -p:RuntimeIdentifier=linux-x64now succeeds (previously failed withNETSDK1201due to global-property leakage) and stages connectors under.../linux-x64/Connectors/....dotnet testonReqnroll.IdeSupport.LSP.Server.Tests(Connector-related tests): 46 passed, 0 failed (43 existing + 3 new).dotnet.exein assertions to be OS-aware, since that's now legitimately platform-dependent behavior.ResolveNonWindowsDotNetCommandpure function (null/empty/setDOTNET_ROOT).publish-serverCI matrix job (win-x64/linux-x64/osx-x64/osx-arm64) already exercises this exact scenario on every PR touchingsrc/LSP/**.🤖 Generated with Claude Code