zed icon indicating copy to clipboard operation
zed copied to clipboard

Add `zip` extract support for Windows

Open huacnlee opened this issue 1 year ago β€’ 7 comments

Release Notes:

  • ~~[x] Added extension download zip file to extract supports on Windows.~~
  • [x] Fixed install Node.js runtime and NPM lsp installation on Windows.
  • ~~[x] Fixed Copilot on Windows.~~
  • [x] Added http_proxy env for NPM command, if system env has this env.
  • [x] Update Node runtime command to execute on Windows with no window popup.

Checklist

  • [x] Test Node.js runtime and others on Windows platform.
  • ~~[x] Test Copilot changes on macOS.~~
  • [x] Test typescript-language-server install on macOS
  • [x] Test Node runtime execute with no window on Windows

Ref #9619, #9424

huacnlee avatar Apr 29 '24 10:04 huacnlee

image

Node.js runtime have successfully installed on Windows now.

huacnlee avatar Apr 29 '24 14:04 huacnlee

Now, Node.js runtime has fixed and Copilot works.

https://github.com/zed-industries/zed/assets/5518/e27cedf9-6aa1-4a94-9734-89e257f6704e

huacnlee avatar Apr 30 '24 14:04 huacnlee

Node runtime have been passed test.

https://github.com/zed-industries/zed/assets/5518/eed3243f-e201-47db-9504-7d70ba61d013

huacnlee avatar Apr 30 '24 15:04 huacnlee

Hi @maxdeviant, @mikayla-maki

I think I have done of all about Windows install zip and Node.js runtime install, we can review and testing now.

I have to do a lot of file change, because there are too many issues on Windows. They are mostly issues that have different path on Windows.

huacnlee avatar Apr 30 '24 15:04 huacnlee

Anything I can do to help with this? Was trying to solve the same issue and found this PR πŸ™‚ Those force-pushes are killing me trying to work out what's going on with the current state of the PR so thought it better I just ask πŸ˜…

eth0net avatar May 05 '24 14:05 eth0net

I have updated:

  1. Moved archive into node_runtime crate as a mod, I keep the methods not just only the zip, we may use that in the future.
  2. Reverted other crate changes, just keep the node_runtime.
  3. The since_v0_0_6.rs still use unzip command to extract zip file, this can't work on Windows, I think we can make author PR to discuss this. For example: https://github.com/zed-industries/zed/blob/main/extensions/csharp/src/csharp.rs#L75

huacnlee avatar May 09 '24 02:05 huacnlee

~~I just did a fresh installation of the Node.js runtime on Windows. It seems that we have to modify the root_path part of Copilot (Commit: https://github.com/zed-industries/zed/pull/11156/commits/5131e1a5db1ea941e1f72e253af6c170d545eb19), otherwise it will not start and will directly crash.~~

Reverted this copilot change.

The https://github.com/zed-industries/zed/pull/11591/files#diff-9aed0f58926aee71638164c95da3800a90460d525d736a354c71490e333c8d88R581 is a better way.

huacnlee avatar May 09 '24 08:05 huacnlee

@maxdeviant For other parts of the zip decompression, you can follow up to see how to deal with it. Currently, there are still problems using the unzip command in the extension, and you need to follow up.

However, the parts that have been merged so far and the panic problem caused by Copilot's root_path unwrap will be fixed. Then the most Node.js related ones can already be run.

The HTTP Proxy issue has not been resolved yet. I don’t know if it is a problem with my proxy software. I have tested it before, but it was strange today, so I canceled it first. I'll submit another one after it's resolved.

huacnlee avatar May 09 '24 13:05 huacnlee

However, the parts that have been merged so far and the panic problem caused by Copilot's root_path unwrap will be fixed. Then the most Node.js related ones can already be run.

this should fixed, currently open immediaterly crashed.

CharlesChen0823 avatar May 09 '24 13:05 CharlesChen0823