yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.44k stars 1.11k forks source link

[Case Study] VSCode + Zip support #1157

Open arcanis opened 4 years ago

arcanis commented 4 years ago

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

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:

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.

arcanis commented 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
cspotcode commented 4 years ago

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.

BasixKOR commented 8 months ago

It seems like this has been fixed by upstream (VS Code): https://github.com/microsoft/vscode/pull/94986