fix(vscode): respect manual LSP path settings when auto-validation is disabled#9258
fix(vscode): respect manual LSP path settings when auto-validation is disabled#9258wsilveiranz wants to merge 2 commits into
Conversation
… disabled Three issues fixed: 1. languageServerDLLPath and languageServerNupkgPath settings were declared in package.json but never consumed by getSDKPaths(). Now when autoRuntimeDependenciesValidationAndInstallation is OFF, these settings are read directly instead of constructing paths from autoRuntimeDependenciesPath. 2. Regression from 0d9fafd: a tryGetLogicAppCustomCodeFunctionsProjects gate was added that silently prevented the LSP server from starting unless a C# custom code project existed alongside the Logic App. The original design (298310a) had no such gate. Removed. 3. installBinaries() unconditionally overwrote dotnetBinaryPath, nodeJsBinaryPath, and funcCoreToolsBinaryPath with system defaults on every activation when auto-validation was OFF, clobbering user-configured paths. Now only sets defaults if the settings are not already configured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
✅ Screenshots/Videos
Summary Table
This PR passes review for title and body compliance.Last updated: Mon, 08 Jun 2026 03:32:48 GMT |
There was a problem hiding this comment.
Pull request overview
This PR improves the VS Code Logic Apps extension’s Language Server Protocol (LSP) startup behavior in environments where autoRuntimeDependenciesValidationAndInstallation is disabled, ensuring explicitly configured paths are honored and the language server isn’t incorrectly gated.
Changes:
- Added constants for
languageServerDLLPath/languageServerNupkgPathconfiguration keys. - Updated LSP startup to (a) no longer require a linked custom code project and (b) read explicit LSP DLL/nupkg paths when auto-validation is disabled.
- Updated binaries installation logic to avoid overwriting user-configured binary paths when auto-validation is disabled, with corresponding test updates.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/vs-code-designer/src/constants.ts | Adds constants for manual LSP path settings keys. |
| apps/vs-code-designer/src/app/utils/binaries.ts | Avoids overwriting existing binary path settings when auto-validation is off. |
| apps/vs-code-designer/src/app/utils/test/binaries.test.ts | Updates tests to cover “don’t overwrite” + “set defaults only when unset” behavior. |
| apps/vs-code-designer/src/app/languageServer/languageServer.ts | Removes custom-code gating; supports manual LSP path settings when auto-validation is off. |
| apps/vs-code-designer/src/app/languageServer/test/languageServer.test.ts | Removes obsolete gating test; adds manual-mode path behavior tests. |
| if (lspServerPath && !(await fse.pathExists(lspServerPath))) { | ||
| window.showWarningMessage(`Language server DLL not found at configured path: ${lspServerPath}`); | ||
| return { lspServerPath: undefined, sdkNupkgPath }; | ||
| } | ||
|
|
||
| if (sdkNupkgPath && !(await fse.pathExists(sdkNupkgPath))) { | ||
| window.showWarningMessage(`Language server SDK nupkg not found at configured path: ${sdkNupkgPath}`); | ||
| return { lspServerPath, sdkNupkgPath: undefined }; | ||
| } |
There was a problem hiding this comment.
Fixed — removed the duplicate warnings from getSDKPaths(). Now only start() shows the appropriate message when paths are undefined, avoiding duplicate popups.
| it('should not overwrite existing paths in devContainer workspace', async () => { | ||
| (getGlobalSetting as Mock).mockReturnValue(true); | ||
| const devContainerModule = await import('../devContainerUtils'); | ||
| vi.mocked(devContainerModule.isDevContainerWorkspace).mockResolvedValue(true); | ||
|
|
There was a problem hiding this comment.
Fixed — updated the mock to return realistic path strings (/custom/path/dotnet, /custom/path/node, /custom/path/func) instead of a boolean, making the test more representative of actual usage.
…ic test values - Remove path-not-found warnings from getSDKPaths() to avoid duplicate popups (start() already shows appropriate warnings when paths are undefined) - Use realistic path strings instead of boolean in binaries test mock Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Commit Type
Risk Level
What & Why
Fixes three issues that prevent the VS Code extension from working correctly when
autoRuntimeDependenciesValidationAndInstallationis disabled (e.g., for security-restricted environments where the extension cannot download/install dependencies automatically).1.
languageServerDLLPathandlanguageServerNupkgPathsettings ignoredThese settings are declared in
package.jsonbut were never consumed bygetSDKPaths(). The function always constructed paths fromautoRuntimeDependenciesPath+ hardcoded subfolder patterns, regardless of the auto-validation setting.Fix: When auto-validation is OFF,
getSDKPaths()reads the explicit user-configured paths directly.2. Regression: LSP server gated on custom code project detection
Commit
0d9fafd74introduced a gate that silently prevented the LSP server from starting unless a C# custom code project existed alongside the Logic App. The original design (298310ab4) had no such requirement.Fix: Removed the gate so the language server starts unconditionally (as originally designed).
3.
installBinaries()overwrites user-configured binary pathsOn every activation when auto-validation is OFF,
installBinaries()unconditionally resetdotnetBinaryPath,nodeJsBinaryPath, andfuncCoreToolsBinaryPathto bare defaults, clobbering any user-configured paths.Fix: Only sets defaults when the settings are not already configured.
Impact of Change
autoRuntimeDependenciesValidationAndInstallationdisabled can now properly configure and use explicit LSP DLL/NUPKG paths and retain their custom binary paths across extension activations.Test Plan
Contributors
@wsilveiranz
Screenshots/Videos
N/A - No UI changes.