-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows: Fix rust-analyzer download #20408
windows: Fix rust-analyzer download #20408
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @ArthurBrussee on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for spotting.
Let's make it closer to fetch_server_binary
in typescript.rs
, so no manual fiddling with OS name, extensions and zip files is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, no manual string concatenations and zip extractions, thank you.
match Self::GITHUB_ASSET_KIND { | ||
AssetKind::TarGz => { | ||
let decompressed_bytes = GzipDecoder::new(BufReader::new(response.body_mut())); | ||
let archive = async_tar::Archive::new(decompressed_bytes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk how I've missed this, but TarGz != Gz (our case as noted just above).
Follow-up of #20408 Release Notes: - (Preview) Fixed broken rust-analyzer downloads
Follow-up of #20408 Release Notes: - (Preview) Fixed broken rust-analyzer downloads
After rust-lang/rust-analyzer#18412, there is no longer a .gz file for windows rust-analyzer targets, and the rust analyzer LSP fails to download. This fixes it by using the .zip version on windows.
The .zip also extracts to a folder containing rust-analyzer.exe rather than just a file. I've handled it in this code, but am not 100% sure if other parts of the code need too be aware of it.
Release Notes: