fix(update): install LS via install-ls sources#192
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the update.sh language-server (LS) update mechanism to delegate downloads/selection logic to install-ls.sh, and adds guards/tests/documentation to prevent drifting back to a stale hardcoded LS release URL.
Changes:
- Replace
update.sh’s hardcoded LS download logic with a call toinstall-ls.sh(usingLS_INSTALL_PATH). - Swap GNU
grep -Pparsing of.envfor anawk-based approach for better macOS compatibility. - Add a Node test to enforce delegation and avoid reintroducing the stale WindsurfAPI asset URL; update UI strings and docs to reflect new fallback sources.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| update.sh | Delegates LS updates to install-ls.sh and replaces .env parsing implementation |
| test/update-script-ls-source.test.js | Adds regression tests to prevent hardcoded LS URL / GNU grep-only usage |
| src/dashboard/i18n/zh-CN.json | Updates LS update description text to reflect additional sources |
| src/dashboard/i18n/en.json | Updates LS update description text to reflect additional sources |
| src/dashboard/api.js | Updates inline comment describing LS source fallback chain |
| install-ls.sh | Updates usage/docs and clarifies fallback chain comment |
| README.md | Documents that update.sh now updates LS via install-ls.sh |
| README.en.md | Documents that update.sh now updates LS via install-ls.sh |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Fixed problems raised by copilot. |
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.
改了什么 / What changed
update.shlanguage-server updates throughinstall-ls.shinstead of a stale hardcoded WindsurfAPI release URL..envparsing.为什么 / Why
update.shstill downloadedlanguage_server_linux_x64from the olddwgx/WindsurfAPIrelease asset directly, whileinstall-ls.shhad already been updated to use the fresh third-party Windsurf desktop LS release fallback. This made one-click updates miss the newer LS source and bypass the atomic install path.The
.envparser inupdate.shalso used GNU-onlygrep -P, which fails on macOS BSD grep during local debugging.测试 / Testing
bash -n update.sh install-ls.shnode --test test/update-script-ls-source.test.js test/install-ls-atomic-rename.test.js test/platform-ls-paths.test.js test/langserver-binary-update.test.js test/check-i18n.test.jsChecklist