hendriknielaender / zvm

⚡ Fast and simple zig version manager
MIT License
22 stars 3 forks source link

Feature Request: support download zls #53

Open jinzhongjia opened 2 months ago

jinzhongjia commented 2 months ago

Maybe we can add feat to download zls, and just like using exec with zig, it also can use on zls!

hendriknielaender commented 2 months ago

Yeah that's a cool idea.

jinzhongjia commented 2 months ago

I'm trying to add zls support But maybe we need to modify the command line, such as zmv zls i 0.13.0 or zvm i 0.13.0 --zls

jinzhongjia commented 2 months ago

I have a little question, why did you add a lot of assert in the source code?

I find that many assert are unnecessary

hendriknielaender commented 2 months ago

I have a little question, why did you add a lot of assert in the source code?

I find that many assert are unnecessary

I added it only to three functions. One in update_current to check that the zig_path and symlink_path variables are not empty before attempting to update the current symbolic link or directory.

And the others are copy_dir and content. IMHO that's not a lot. In these cases, the assertions act as security checks.

jinzhongjia commented 2 months ago

I suggest introducing a command line parsing package. The current command function is no longer sufficient.

For example, the clap package is of very high quality.

hendriknielaender commented 2 months ago

I suggest introducing a command line parsing package. The current command function is no longer sufficient.

For example, the clap package is of very high quality.

What's the current limitation that we are facing? If there are no major obstacles, I want to avoid adding dependencies.

jinzhongjia commented 2 months ago

For example, 'install 0.13.0' is designed to take only one argument, but I think 'install zig 0.13.0' is more intuitive and can be distinguished from 'install zls 0.13.0'. It can be installing zig for default 'install 0.13.0'.

hendriknielaender commented 2 months ago

https://github.com/hendriknielaender/zvm/pull/57

Currently we only need that for zls as additional argument, so something like in my draft should work.