Open arcanis opened 4 years ago
The Zip extension is published on the marketplace: https://marketplace.visualstudio.com/items?itemName=arcanis.vscode-zipfs
It's still experimental but the core is there. VSCode will be able to open absolute zip paths if prefixed by zip:
(no extra slashes). For example, try pasting the following into a buffer, then command-click it:
zip:/<path to the berry repository on your machine>/.yarn/cache/left-pad-npm-1.3.0-0382e69409-2.zip/node_modules/left-pad/package.json
For what it's worth, it may be possible to patch the typescript language features extension, share as a VSIX, and install it in vanilla VSCode installations. It might allow ambitious yarn 2 users to try out the functionality for themselves and see what breaks.
It seems like this has been fixed by upstream (VS Code): https://github.com/microsoft/vscode/pull/94986
What package is covered by this investigations?
VSCode
Describe the goal of the investigation
Pressing Command+Click on a symbol coming from a packed archive yields an error, because VSCode doesn't know how to access the files from the zip archive.
Investigation report
We've written a Zip extension for VSCode that's stored within our repository. It adds support for the
zip://
protocol, which looks for a zip archive in the associated path and opens an arbitrary file it contains.@cspotcode wrote a TSServer indirection that makes sure the TypeScript server adds the
zip://
prefix to everything it sends to VSCode. In theory it means VSCode would open the file using the Zip extension we provided (or would keep generating the same error if the extension isn't installed).The problem is that there's a tiny code in VSCode that hardcodes a list of accepted protocols. In order to open it to other ones, they wish to see comprehensive testing.
Followup
We need somehow to take ownership of this task (I'm swamped myself, and despite the high priority of this particular task there are a bunch that require more expertise and that I need to address first). To make it easier, I've tried to devise a plan you can follow:
The step zero is to publish the VSCode zip extension into the Microsoft store. I'll do that.
The first step is to land the server indirection (make sure you're logged into the TS Discord server) into the SDK. @cspotcode, could you help us with that?
The next step is to clone the VSCode repository and apply the fix I've suggested.
I've checked into the repository a
vscode-zip-test-procedure.sh
file. Executing it will setup various repositories and ask to make various confirmations.