question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Builtin support for reading files from their zip archives

See original GitHub issue

Rel: #17271

Note: This is now possible (although non-builtin) using the ZipFS extension

High-level

It would be useful for VSCode to be able to read files even when they’re stored within zip archives. Opening /foo/bar.zip/package.json would succeed. Read-only is likely fine, at least for a first iteration.

Motivation

  • This feature isn’t unheard of. Both vim and emacs support reading files from zip archives (they even go a bit farther by allowing to also edit them, but we might not want to have to deal with the UI complexity for now).

  • Package managers are experimenting with virtual install folders. Being able to read third-party files from the archives that contain them will be important to provide a good developer experience (particularly for the “ctrl+click on a symbol to go to its definition” workflow). Zip will be used by Yarn because of its good random access properties.

Suggested Implementation

  • The Yarn project ships a wasm build of the libzip as an external package. This would make it easy to use a battle-tested zip library at little cost.

  • The size cost would be around ~300KB for the Zip implementation (which could be reused for other purposes - there’s a bunch of things that could use Zip support down the road).

  • You might actually already have a library able to do that?

Why not an extension

  • I’ve started working on an extension to help with that (vscode-zipfs), but it cannot be integrated as well as I’d like. In particular, it doesn’t work with the ctrl+click workflow I mentionned, and running code /foo/bar.zip/package.json cannot open the right file. I believe a builtin integration could provide a seamless integration, which would be beneficial to the users.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:735
  • Comments:35 (4 by maintainers)

github_iconTop GitHub Comments

137reactions
vscodebot[bot]commented, Jan 16, 2020

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

101reactions
vscodebot[bot]commented, Jan 15, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Read more comments on GitHub >

github_iconTop Results From Across the Web

zipfile — Work with ZIP archives — Python 3.11.1 documentation
The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a...
Read more >
Python's zipfile: Manipulate Your ZIP Files Efficiently
In this guided tutorial, you'll learn how to manipulate ZIP files using Python's zipfile module from the standard library.
Read more >
Reading ZIP files in Java - Javamex
Reading a ZIP file in Java. Java provides the facility to read raw data compressed using the DEFLATE algorithm using a Deflater or...
Read more >
Zip and unzip files - Microsoft Support
To unzip all the contents of the zipped folder, press and hold (or right-click) the folder, select Extract All, and then follow the...
Read more >
macOS ZIP files made with the built-in Archive Utility aren't ...
If I import a ZIP archive of CSV files that I've created by Control-clicking in the macOS Finder (which invokes Archive Utility behind...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found