Repository navigation
fix(zed): use the bare version when locating the rcl-lsp release asset - #19
Merged
Merged
Conversation
`zed::latest_github_release` returns the release tag as `version`. This
repository tags releases per package, e.g.
`react-component-lens(packages/vscode/package.json)@1.0.5`, so the
extension asked for
rcl-lsp-react-component-lens(packages/vscode/package.json)@1.0.5-x86_64-pc-windows-msvc.zip
while the asset attached to that release is named
rcl-lsp-1.0.5-x86_64-pc-windows-msvc.zip
The language server therefore never downloaded, on any platform, and Zed
reported "no release asset found matching ...".
Take the part of the tag after the last `@` and use it for both the
asset name and the install directory. The directory matters too: the
full tag contains `/` and parentheses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Please fix lint |
Also sync Cargo.lock workspace versions to 1.0.5 and add scripts/ci-check.ps1, which runs the deploy.yml test job steps locally using the bun version CI pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI runs the latest stable clippy, which rejects assert!(x.is_empty()) and assert!(!x.is_empty()). Compare lengths (or the empty string) instead so the failing value is shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The failing |
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.
Problem
In Zed, the extension (1.0.5) fails to start its language server:
zed::latest_github_releasereturns the release tag asversion. Releases here are tagged per package, so the tag is not a bare version number:react-component-lens(packages/vscode/package.json)@1.0.5rcl-lsp-react-component-lens(packages/vscode/package.json)@1.0.5-x86_64-pc-windows-msvc.ziprcl-lsp-1.0.5-x86_64-pc-windows-msvc.zipThe same mismatch applies on macOS and Linux, since every asset name is built the same way.
Fix
packages/zed/src/lib.rsonly:release_version, which takes the part of the tag after the last@(and drops a leadingvfrom a plain tag)./and parentheses.1.0.5/v1.0.5tags.Testing
cargo test -p rcl-zed: 2 passed.cargo fmt -p rcl-zed -- --check: clean.cargo build -p rcl-zed --target wasm32-wasip2: builds.rcl-lspdownloads and starts, and JSX tags are coloured in a.tsxfile.rcl-lsp.exeat its top level, which is where the extension looks for it; I did not inspect the.tar.gzarchives.Notes
Cargo.lockonmainstill lists the workspace crates at 1.0.4 while their manifests say 1.0.5, so any build rewrites it. I left that out to keep this change to one file.🤖 Generated with Claude Code