Skip to content

Propagate error from zipfile to the caller of read()#319175

Merged
dmitrivMS merged 2 commits into
mainfrom
dev/dmitriv/zip-handle-errors
May 30, 2026
Merged

Propagate error from zipfile to the caller of read()#319175
dmitrivMS merged 2 commits into
mainfrom
dev/dmitriv/zip-handle-errors

Conversation

@dmitrivMS
Copy link
Copy Markdown
Contributor

This will make errors like #314359 be reported more nicely.

Copilot AI review requested due to automatic review settings May 30, 2026 23:03
@dmitrivMS dmitrivMS enabled auto-merge (squash) May 30, 2026 23:03
@dmitrivMS dmitrivMS self-assigned this May 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves ZIP reading error reporting by ensuring yauzl/ZipFile errors are propagated back to callers of read() (and therefore buffer()), which is relevant to extension installation flows that need clearer diagnostics for corrupt/truncated VSIX downloads.

Changes:

  • Attach a zipfile-level 'error' listener in read() so the returned promise can reject when the underlying ZIP parser fails.
Show a summary per file
File Description
src/vs/base/node/zip.ts Adds propagation of ZipFile error events from read() to its returned promise.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread src/vs/base/node/zip.ts Outdated
@dmitrivMS dmitrivMS merged commit 7eff9ee into main May 30, 2026
25 checks passed
@dmitrivMS dmitrivMS deleted the dev/dmitriv/zip-handle-errors branch May 30, 2026 23:38
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants