asdf-zig icon indicating copy to clipboard operation
asdf-zig copied to clipboard

Include nightly versions

Open codethief opened this issue 2 years ago • 6 comments

The Bash script retrieves https://ziglang.org/download/index.json, which lists the current v11.0-dev.* nightly versions. However, when I run asdf list all zig I only see the stable versions (0.1.1 through 0.10.1).

Could this be changed to also include nightly versions?

Unfortunately, I can't really tell where in the script the filtering happens, otherwise I'd change it myself.

codethief avatar Mar 07 '23 01:03 codethief

When I run the same command (asdf list all zig) I see 0.2.0 through 0.10.1 and master.
asdf install zig master gives me version 0.11.0-dev.1884+2641feb9b.

jhcl avatar Mar 21 '23 21:03 jhcl

I like being able to easily install the latest nightly build version with asdf install zig master, so thank you for adding that.

I think it would still be useful to have individual nightly build versions installable with asdf. For some additional context, the recommended way to use zig (aside from evaluation) is to use a nightly build.

Since nightly builds can change a lot, and some can have major problems, it makes sense to be able to pin specific nightly build versions for different projects. I'm currently doing this with vendoring, but I'd much rather use asdf and .tool-versions.

One potential issue is that adding nightly build versions to this plugin would result in a long version list after a while, since there will be one for each day. I'm not sure how much of a problem this could become, depending on when zig starts using a better release process.

Additional thoughts? Are you open to a pull request?

neodon avatar Mar 29 '23 21:03 neodon

  • I am not the maintainer, just a passer-by. It would be nice to have even more versioning options for such a fast moving target but I don't think asdf tracks github commits, just github labels (see comment in https://github.com/cheetah/asdf-zig/issues/5).
  • As far as I know master is the nightly build.
  • When i do a asdf plugin list-all | grep zig I get a reference to https://github.com/cheetah/asdf-zig.git. So I'm not sure we are discussing this in the correct repository. Perhaps the repo owner can enlighten us.

jhcl avatar Mar 29 '23 22:03 jhcl

Pardon my confusion in assuming you were the repo owner. Also good callout on what repo asdf is actually using for zig.

neodon avatar Mar 29 '23 23:03 neodon

yeah i wish master was included in list-all. Eventually I found out you can just install master. The list-all function uses only "numeric-like" versions from https://ziglang.org/download/index.json , but you can actually install any version from that JSON page.

  "master": { // << what you need to install
    "version": "0.11.0-dev.2546+cb54e9a3c", // << what you get

Source:

  • list-all https://github.com/asdf-community/asdf-zig/blob/master/bin/list-all#L8
  • install https://github.com/asdf-community/asdf-zig/blob/master/bin/install#L54

We have a HTTP server now 🥳

https://ziglang.org/documentation/master/std/#A;std:http.Server

tobyhinloopen avatar Apr 12 '23 14:04 tobyhinloopen

Any luck with this thread?

chenrui333 avatar Jan 05 '24 15:01 chenrui333