Skip to content

Add tar.gz extraction utility and use it for downloads#225

Open
tartarughina wants to merge 1 commit intozed-extensions:mainfrom
tartarughina:download-tar
Open

Add tar.gz extraction utility and use it for downloads#225
tartarughina wants to merge 1 commit intozed-extensions:mainfrom
tartarughina:download-tar

Conversation

@tartarughina
Copy link
Copy Markdown
Collaborator

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.

Fixes #222

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.
@tartarughina
Copy link
Copy Markdown
Collaborator Author

tartarughina commented Apr 23, 2026

The new function is based on what Zed does when downloading the proxy on remote hosts and after an analysis of the download_file function vended via zed_extension which, due to a streaming approach, might cause issues during decompress operations.
@MrSubidubi

Copy link
Copy Markdown
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, can we not also make a fix for this upstream?

@tartarughina
Copy link
Copy Markdown
Collaborator Author

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.

@MrSubidubi
Copy link
Copy Markdown
Contributor

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.

@MrSubidubi
Copy link
Copy Markdown
Contributor

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 zed_extension_api versioning, as we don't have to ship any updates there

@tartarughina
Copy link
Copy Markdown
Collaborator Author

I see, then I'll work on a patch for upstream if it's something not going to be bundled with the extension version.

@tartarughina
Copy link
Copy Markdown
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot find equinox launcher

2 participants