new(github.com/marler8997/zigup): Zig version manager (source build)#13117
Open
tannevaled wants to merge 4 commits into
Open
new(github.com/marler8997/zigup): Zig version manager (source build)#13117tannevaled wants to merge 4 commits into
tannevaled wants to merge 4 commits into
Conversation
zigup is a CLI for downloading and switching between Zig compilers. It
manages compilers in its own install-dir (independent of pkgx's
ziglang.org bottle), so users who want explicit version-manager workflows
outside pkgx environments can use it.
Built from source via pantry's ziglang.org — zigup's build.zig.zon
declares no .dependencies, so the build is self-contained (no Zig package
manager fetching). Tags ship as vYYYY_MM_DD; libpkgx's underscore->dot
heuristic parses these as CalVer, and the URL uses {{ version.tag }} to
recover the literal upstream tag.
CI on 0.15.2 hit `error: root source file struct 'builtin' has no member named 'Mode'` — zigup's build.zig still uses `std.builtin.Mode`, which Zig 0.15 removed. Upstream's `.minimum_zig_version = "0.14.0"` is a floor, not a ceiling; constrain to the 0.14 series until upstream catches up.
…Safe`
zigup's build.zig calls `b.standardOptimizeOption(.{
.preferred_optimize_mode = .ReleaseSafe })`. When `preferred_optimize_mode`
is set, Zig 0.14 registers a `--release` boolean flag instead of the
usual `-Doptimize=...` option — so passing `-Doptimize=ReleaseSafe`
fails with `error: invalid option: -Doptimize`. `--release` opts into
the preferred mode, which is ReleaseSafe here.
Pantry's audit rejects bare GitHub-user paths: error: marler8997/zigup is not a valid project name. Please use a fully qualified URL to the canonical project page. Relocate the recipe to the conventional path `projects/github.com/<user>/<repo>/`, matching neighbouring recipes (e.g. `projects/github.com/eliben/pycparser`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
projects/github.com/marler8997/zigup/package.yml— a from-source build of zigup, Zig's standalone version manager.ziglang.orgbottle. No vendored binaries.build.zig.zondeclares.minimum_zig_version = "0.14.0"and ships no.dependencies, so the build needs nothing beyond a Zig toolchain. No Zig-package-manager fetching is involved.ziglang.orgbottle for users who want to install/switch between Zig versions on their own (zigup keeps compilers in a separate install-dir, independent of pkgx environments).Notes for reviewers
vYYYY_MM_DD(current release:v2025_05_24). libpkgx's version parser converts underscores to dots when no dots are present in the stripped tag, so2025_05_24becomes2025.5.24— valid CalVer-shaped semver. The distributable URL uses{{ version.tag }}to recover the literal upstream tag.build.skip: fix-patchelfmirrorsziglang.org's pattern — zig produces static binaries.ziglang.org: ^0.14. zigup'sbuild.zig.zonsays.minimum_zig_version = "0.14.0", but thebuild.zigstill importsstd.builtin.Modewhich was removed in Zig 0.15, so the 0.14 series is required until upstream updates.--releaseis passed (not-Doptimize=ReleaseSafe) because zigup'sb.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSafe })registers the--releaseboolean flag instead of-Doptimize(Zig 0.14 behaviour).anyzigand recommends it). zigup is still supported by upstream and remains in active use by many. This is mentioned in the recipe header comment so future maintainers have context.zigup --help 2>&1 | grep -qi 'usage'— usage is written to stderr by upstream, so stderr is redirected before the grep.Test plan
pkgx +github.com/marler8997/zigup zigup --helpon linux/x86-64pkgx +github.com/marler8997/zigup zigup --helpon linux/aarch64pkgx +github.com/marler8997/zigup zigup --helpon darwin/aarch64pkgx +github.com/marler8997/zigup zigup --helpon darwin/x86-64