Closed SigSeg-V closed 1 year ago
Regarding unbundling the tarball on Windows, is the limitation that older versions of ZLS on Windows are encoded as tarballs, or is it that before 0.11, only Unix builds were available?
I think in the last version of ZVM I included some Go functions to extract tarballs. Could we use these on Windows to support the older releases?
The problem is they changed formats in 0.10.0 which is packaged as a zstd on all platforms, and Windows and MacOS doesn't have zstd out of the box so would have to list as a dependency. zstd is much more of a hassle to install on windows than linux/mac so I don't like the solution, but if installed it will work though. I pushed a small commit that changes the extract command to check the extension for the extract method instead of looking at OS and works on all platforms I can test. A summary of the new test results: | OS | Arch | Versions Tested | Deps | Outcome |
---|---|---|---|---|---|
Linux | amd64 | 0.1 - master | zstd | ✔ | |
MacOS | aarch64 | 0.1 - master | zstd | ✔ | |
Windows | amd64 | 0.1 - master | zstd | ✔ |
If the zls install fails gracefully on windows on pre 0.11 then I'd say +1 on merging it... of course I would prefer if it worked, but zls is exactly the same hazzle as zig.
I've changed my mind on this issue. It might be worth supporting it for the more recent versions, then as something we can tackle later on for earlier versions.
I've just gotten back from my vacation and am suffering from some severe jet lag. I'll be taking today to recover, then I should be able to give this issue my full attention tomorrow.
I should reintroduce that I'll probably change the flags for this download to work, but overall I'm on board with the feature. More notes to follow tomorrow night.
Pushed my changes https://github.com/tristanisham/zvm/tree/SigSeg-V-master
So right now the only issue is that downloading Zig or ZLS will wipe out the other install. Not super helpful. I'm probably going to call it a night tonight, but the final step is to make sure both can be installed without conflicting with the other. I'm thinking of adding ZLS to a deps dir or something. I'm suffering from some jet lag so I'll reevaluate after some sleep!
Edit:
I did end up fixing it. Back to the original behavior where ZLS has to be installed with a Zig version.
The new syntax is:
zvm i -D=zls master
Also, @SigSeg-V @Joen-UnLogick It looks like there's a 100% Go zstd extraction library
Added a flag to install ZLS along with zig, this is useful for users not using vscode who have to install zls manually to have language server functionality in their editor. Limitations of this change: cannot install ZLS prior to 0.11.0 by default on Windows as it is packaged as a tarball, which can't be untarred by default.
Tested on: Linux x86_64 Windows x86_64 MacOS aarch64