Skip to content

add zig update command which can update to latest zig version #2807

Closed
@andrewrk

Description

@andrewrk

Once we have networking in the standard library (See #2007) the binaries shipped from ziglang.org/download could have a command to update to the latest one. The download page already has an auto-updated JSON version of the page.

This functionality would be disabled by default, so that package managers and source installations do not have the command, or perhaps the command exists but returns an error explaining to use the package manager. The CI builds would add a configuration option to enable this feature.

Until this is available, @marler8997's python script is handy.

This feature is not blocking on #2377. It would be perfectly reasonable to use blocking networking calls for this feature.

It's not important to ship this feature in any particular release cycle, as it's more for people who are using master branch.

One problem to solve is the fact that the tarballs have version information in the directory path, with the zig binary inside the versioned directory. So upon completion of the update, the directory name would be incorrect. Or if the update command renamed the directory, then the path to the zig binary would be different, possibly breaking a symlink.

Whether or not this feature should exist post-zig-1.0 is up for debate. However we're not at 1.0 yet and things change quickly. This might be a nice way to keep zig users up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions