Skip to content

Granular builds for specific zig versions #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
menduz opened this issue Sep 26, 2023 · 4 comments
Closed

Granular builds for specific zig versions #1472

menduz opened this issue Sep 26, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@menduz
Copy link

menduz commented Sep 26, 2023

Hi friends, thanks for building this language server!

Context and reach

As most zig developers, my workflow is almost always on the bleeding edge of the newest releases. I often take one day every two weeks to update all projects at once to the latest releases. Including zls. But since it is impossible to do all updates at once, I work with devcontainers to have granular versions per project.

The solution works perfectly when there are no breaking changes between the zig version of the container and zls, but when there is (and this happens a lot) I can only download the latest build for zls, which usually only works with the latest zig, and that may not be the case for all of my projects.

Solution space exploration

  1. Since builds are being built and uploaded using a specific zig version, I was thinking that maybe there can be one extra alias/indirection/redirection to download older versions by zig version. In that case, I would be able to change my scripts like this:
    -wget -c https://zig.pm/zls/downloads/$(arch)-linux/bin/zls -O /usr/local/bin/zls
    +wget -c https://zig.pm/zls/downloads/$(arch)-linux-0.12.0-dev.587+eb072fa52/bin/zls -O /usr/local/bin/zls
  2. Maybe there is a public .json somewhere with this exact information that I'm not able to find.
  3. Any other ideas?
@menduz menduz added the enhancement New feature or request label Sep 26, 2023
@Techatrix
Copy link
Member

@SuperAuguste did some great work on our CI and we can now provide download URLs to non-master builds.
All metadata is about builds in collected into a single index.json which should hopefully provide you with the necessary information.

download URLs would resolve like this:
https://zigtools-releases.nyc3.digitaloceanspaces.com/zls/<ZLS version>/<target>/zls[.exe]
example:
https://zigtools-releases.nyc3.digitaloceanspaces.com/zls/0.12.0-dev.111+ebbae55/x86_64-linux/zls

@menduz
Copy link
Author

menduz commented Oct 11, 2023

Oh that's amazing!

It seems like artifacts are being uploaded correctly but the index.json itself is outdated

@SuperAuguste
Copy link
Member

Afaik it actually is up to date (ctrl+f "c9d99fcacb8b9a83b630397ed719ee83cc725031") - issue is red commits due to ziglang/zig#17477.

@menduz
Copy link
Author

menduz commented Oct 11, 2023

My bad, I was confusing the zls and zig versions. Many thanks for the guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants