Add tar.gz extraction utility and use it for downloads#225
Add tar.gz extraction utility and use it for downloads#225tartarughina wants to merge 1 commit intozed-extensions:mainfrom
Conversation
Replace the problematic streaming gzip extraction with a two-step process: download the full archive to disk first, then extract it using the system `tar` command. This avoids premature-EOF issues and provides better error handling. Update JDK, JDTLS, and proxy binary downloads to use the new `download_and_extract_tar_gz` utility on Unix platforms, while maintaining `download_file` for Windows .zip archives. Add corresponding process:exec capability for tar in extension.toml.
|
The new function is based on what Zed does when downloading the proxy on remote hosts and after an analysis of the |
MrSubidubi
left a comment
There was a problem hiding this comment.
Hm, can we not also make a fix for this upstream?
|
How long will it take for the upstream change to reach the extension? If it's going to take too long then I'm pro at merging this with a TODO of restoring the previous behavior. |
|
Since they will be unrelated to the API version, two weeks at most, if we can verify and cherry-pick, can get them in quicker. |
|
Have to considere here that Zed provides the WASM host and you invoke a method provided by Zed where we do not have to change any bindings. Thus, this is detatched from the |
|
I see, then I'll work on a patch for upstream if it's something not going to be bundled with the extension version. |
Replace the problematic streaming gzip extraction with a two-step process: download the full archive to disk first, then extract it using the system
tarcommand. This avoids premature-EOF issues and provides better error handling.Update JDK, JDTLS, and proxy binary downloads to use the new
download_and_extract_tar_gzutility on Unix platforms, while maintainingdownload_filefor Windows .zip archives.Add corresponding process:exec capability for tar in extension.toml.
Fixes #222