Skip to content

Add Vinix as a build target - #250

Open
metif12 wants to merge 1 commit into
vlang:mainfrom
metif12:vinix-support
Open

metif12 wants to merge 1 commit into
vlang:mainfrom
metif12:vinix-support

Conversation

@metif12

@metif12 metif12 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

build.vsh now has a 'vinix' key in ignore_dirs. It lists only uptime, rather than sharing the macOS list: stat and sync are excluded on macOS because the BSD syscall surface differs from Linux, and Vinix follows POSIX closely enough that both build there. Without the key, the dictionary lookup fell through to an empty list — which read as "build everything" and would have attempted the Windows-excluded Unix set alongside it.

A CI job cross-compiles all 87 tools for the target, since GitHub has no Vinix runner.

That job is not decoration. It is what found that timeout did not compile on any Unix. timeout.v passed mut &p to terminate_process, which only the Windows variant declares as mut; the _nix and _default variants rejected it. Linux, macOS and Vinix were all broken while Windows CI was green, and the -Wimpure-v gate never saw it because only Windows builds the directory. All three variants now take mut p &os.Process so the call site is uniform, and the Windows comment explaining why the pointer is mutable is kept rather than deleted as redundant.

V's side needed nothing: $if vinix, _vinix.c.v file suffixes and -os vinix all already work, and _nix.c.v files are selected on Vinix because the suffix allowlist only excludes them on Windows. I verified that with a probe rather than assuming it.

Verified: 87 of 87 tools cross-compile for Vinix, timeout builds for all four targets (windows, linux, macos, vinix), and the Windows build is unchanged.

Two things I want to flag, not bury

The CI job parses build.vsh with shell text tools to read the ignore list, so the two cannot drift. That parsing is now verified: it extracts exactly uptime, skips exactly 1 of 87, and drops the key word itself. But it is still a shell grep reading a V source file, which is a real fragility — a restructured map literal would break it. A stronger design would have build.vsh emit the list on request (v run build.vsh --print-ignored), which is a bigger change than this PR should carry. Worth a follow-up.

It cross-compiles; it does not run. There is no Vinix runner, so nothing in CI executes the resulting binaries, and a tool that compiles but misbehaves on Vinix will still pass. That is a meaningful gap, and the job says so in a comment rather than implying coverage it does not have.

build.vsh now has a 'vinix' key in ignore_dirs. It lists only uptime, rather than sharing the macOS list: stat and sync are excluded on macOS because the BSD syscall surface differs from Linux, and Vinix follows POSIX closely enough that both do build there. Without the key the dictionary lookup fell through to an empty list, so Vinix would have built the Windows-excluded Unix set as well as everything else at once. A CI job cross-compiles all 87 tools for the target, since GitHub has no Vinix runner. That job is not decoration: it is what found that timeout did not compile on any Unix. timeout.v passed 'mut &p' to terminate_process, which only the Windows variant declares as mut, so the nix and default variants rejected it. Linux, macOS and Vinix were all broken while Windows CI was green. All three variants now take 'mut p &os.Process' so the call site is uniform, and the Windows comment explaining why the pointer is mutable is kept. Verified: 87 of 87 tools cross-compile for vinix, timeout builds for all four targets, and the Windows build is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant