Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
18f2d76
webview, buildplan, services: make the Linux suite green, 20 of 44 fa…
metif12 Oct 5, 2026
8a0c4e6
services/menu: set_menu fails when the bar cannot be hooked, instead …
metif12 Oct 5, 2026
ffd2271
services/dts: mark the blocking commands in the generated .d.ts
metif12 Oct 5, 2026
02f3803
webview, services: align the three hook teardowns, and stop detach cl…
metif12 Oct 5, 2026
64cad00
services: make toast_available private, because no .c.v function has …
metif12 Oct 5, 2026
2bbfa00
buildplan: guard the shape of a json2 + net.http exposure we cannot t…
metif12 Oct 5, 2026
100e26a
docs: stop citing evidence that does not exist, and record two stale …
metif12 Oct 5, 2026
930115c
docs: withdraw two wrong claims about the json2 decode bug, and the r…
metif12 Oct 5, 2026
613e7c1
cli, buildplan: doctor resolves the Windows toolchain through the tes…
metif12 Oct 10, 2026
95f0879
docs, examples: the json2 zero-decode bug no longer reproduces, and t…
metif12 Oct 10, 2026
523ab8d
docs: the accuracy pass reaches ROADMAP.md, and ADR-0038 records its …
metif12 Oct 10, 2026
8fd1586
Dockerfile: pin the V commit, because a cached layer silently chose t…
metif12 Oct 10, 2026
75aa129
Dockerfile: move the V pin to 60542b9, because a green suite hid the …
metif12 Oct 10, 2026
65236e4
services: write the Linux drop backend, the last deliberate stub in t…
metif12 Oct 11, 2026
189b80d
docs, tests/e2e_linux: write out the drop proof instead of claiming it
metif12 Oct 11, 2026
200e043
docs: sweep the whole repo against the facts this week produced, not …
metif12 Oct 11, 2026
26d287a
ROADMAP: close Phase 5's S1 catalog and 5b as code, and say what that…
metif12 Oct 11, 2026
bc2d24c
docs/site: a working veb SSG with --export, 404, pinned paths, and a …
metif12 Oct 11, 2026
b480315
docs/site: record the render_request migration we are waiting for, an…
metif12 Oct 11, 2026
00dba41
docs.yml: pin setup-v to v1.7, because the workflow was red on a depe…
metif12 Oct 11, 2026
480c358
docs.yml: the version tag needs no `v` prefix, or the site silently f…
metif12 Oct 11, 2026
e441e1a
docs.yml: install V as the release asset, because no version of setup…
metif12 Oct 11, 2026
907ad79
docs.yml: export PATH in this step too, or `v` is not found after a s…
metif12 Oct 11, 2026
5900155
docs.yml: split the build from the export, and build where the templa…
metif12 Oct 11, 2026
00b7df0
docs/site: name the 404 template after its method, because V 0.5.2 re…
metif12 Oct 11, 2026
0c60310
docs/site: not_found needs `pub`, because veb calls it from another m…
metif12 Oct 11, 2026
b22804a
docs.yml: the export runs from docs/site too, or it cannot find the b…
metif12 Oct 11, 2026
eaba6e3
CHANGELOG: record the five failures that got docs.yml to its first gr…
metif12 Oct 11, 2026
06c0beb
CI: the Windows job builds V from source at the pinned commit, ending…
metif12 Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 112 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,97 +74,142 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install V
# THE PINNED RELEASE ZIP, NOT winget. `winget install --id=VLang.V`
# fails with "No package found matching input criteria" - there is no
# such package in the winget source (measured 2026-10-05, and reproduced
# against the runner's own `winget search VLang`, which returns nothing).
- name: Install MSYS2 ucrt64 + the webview packages
# MOVED TO THE TOP, and that move is the whole fix for this job's
# long-standing red state.
#
# Downloading the release is better than winget would have been anyway,
# for a reason that is not about winget: it PINS the compiler. Every
# other flag in this job is justified against a specific V - the
# `-ldflags "-lws2_32"` below is needed on 0.5.2 and unnecessary on
# master - so "whatever winget had this morning" made those comments
# untrue by construction. 0.5.2 is pinned to match them.
# It used to sit after `Install V`, because V was installed as the
# 0.5.2 release zip and that zip needs no C compiler to unpack. But
# 0.5.2 has no `json2` in its vlib - `json2` was added to vlang/v on
# 2026-10-03, which is after every published tag - so `bridge/` and
# `state/` could not compile, and the smoke step below failed with
# `no vlib\json2`. AGENTS.md 1b named the only fix that works: build V
# from source at a pinned commit, with MSYS2 installed BEFORE it
# because V's own Windows build needs a C compiler.
#
# It also does not depend on MSYS2, which the next step installs, and
# that constraint is unchanged from the winget version: V's own `make`
# on Windows is not what this job is here to test.
# So the order is now the one that constraint forces: toolchain first,
# compiler second. The same pinned commit the Dockerfile builds, so
# the two CI platforms compile against the same V rather than against
# two different ones that happen to agree.
run: |
$ver = '0.5.2'
$zip = Join-Path $env:RUNNER_TEMP 'v_windows.zip'
$dest = Join-Path $env:RUNNER_TEMP 'vlang'
Invoke-WebRequest -Uri "https://github.com/vlang/v/releases/download/$ver/v_windows.zip" -OutFile $zip
Expand-Archive -Path $zip -DestinationPath $dest -Force
# The archive contains a top-level `v/` directory, so v.exe and vlib/
# end up as SIBLINGS inside it: $dest\v\v.exe and $dest\v\vlib\.
# Putting $dest\v on PATH is therefore what makes `v` resolve.
$vbin = Join-Path $dest 'v'
"$vbin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
choco install msys2 -y --no-progress
C:\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed mingw-w64-ucrt-x86_64-webview mingw-w64-ucrt-x86_64-webview2-loader"

- name: Put ucrt64 on PATH
# Before the V build, not just before the tests. ADR-0005's rule is
# about EVERY later step: without `C:\msys64\ucrt64\bin` on PATH even
# `cc1` cannot find its own DLLs, which fails as a SILENT gcc failure
# rather than a missing-symbol error - and a V built by a cc1 that
# could not load is a V that fails later for a reason nobody can see.
# GITHUB_PATH only affects subsequent steps, which is exactly the
# scope wanted.
#
# SINGLE quotes, and they are load-bearing. A YAML double-quoted scalar
# processes backslash escapes, and `\m` is not one - so the double-quoted
# form of this line was not valid YAML at all. GitHub rejects the whole
# file, reports "This run likely failed because of a workflow file issue",
# and runs zero jobs in 0s. That is the second, distinct cause of the same
# symptom `buildplan/workflow_test.v` was written for: it caught the
# indentation break, and it cannot catch this, because a line-prefix check
# cannot see inside a scalar.
run: |
'C:\msys64\ucrt64\bin' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Build V from source at the pinned commit
# THE PIN, and why it is a commit rather than a tag.
#
# A tag cannot work: no published release contains `json2`. vlang/v
# added it on 2026-10-3, every release predates that, and
# `bridge/` + `state/` import it - so `v test .` fails with
# `builder error: cannot import module "json2" (not found)`. Measured
# against the API's own answer rather than assumed: `gh api
# repos/vlang/v/contents/vlib/json2?ref=7647ce1` returns 404, while
# the same query at the pinned commit returns the module.
#
# The commit is the SAME one the Dockerfile builds, so the Linux and
# Windows jobs compile this repository against one compiler rather
# than two. Bump it in both places together.
#
# `makev.bat -gcc` is V's own Windows build command - it is the first
# thing `vlang/v`'s `windows_ci_gcc.yml` runs after checkout, so this
# is the recipe V itself validates on a runner rather than one invented
# here. The fetch-by-SHA form is used because a shallow clone's HEAD is
# not the pinned commit, and GitHub serves any reachable commit that
# way.
#
# `v symlink` is V's own next step and is kept: `v` resolves its own
# vlib relative to the executable, and this is the binary that step
# leaves on PATH.
run: |
$sha = '60542b9904a3a0102575ec1104e548996f650a83'
$src = Join-Path $env:RUNNER_TEMP 'vsrc'
if (Test-Path $src) { Remove-Item $src -Recurse -Force }
git init -q $src
git -C $src remote add origin https://github.com/vlang/v.git
git -C $src fetch --depth 1 origin $sha
if ($LASTEXITCODE -ne 0) { throw "could not fetch V at $sha" }
git -C $src checkout -q FETCH_HEAD
Push-Location $src
.\makev.bat -gcc
if ($LASTEXITCODE -ne 0) { throw "makev.bat failed with exit code $LASTEXITCODE" }
.\v.exe version
.\v.exe symlink
if ($LASTEXITCODE -ne 0) { throw "v symlink failed with exit code $LASTEXITCODE" }
Pop-Location
"$src" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: This compiler can build this repo
# A smoke step, and it exists because of a measured failure mode rather
# than a hypothetical one: `bridge/` and `state/` import `json2`, and a V
# install whose vlib has no `json2` fails with
# builder error: cannot import module "json2" (not found)
# which reads like a missing dependency in this repo and is not one. On
# 2026-10-03 BOTH V installs on the machine that could have built it were
# affected in one way or another (one lacked json2, the other needed
# -enable-globals). A version check here turns "CI is red for a reason
# nobody can see" into one line of output.
# which reads like a missing dependency in this repo and is not one.
#
# This step is what turned that into a readable failure while the job
# was pinned to 0.5.2, and it is kept now that the job builds from
# source - a green line here is the cheapest possible proof that the
# pinned commit is the one the job thinks it is.
#
# ONE Split-Path, not two, and the reason is the layout: v.exe sits in
# the same directory as vlib/ (the step above puts $dest\v on PATH), so
# one level up from v.exe IS the vroot. The previous two-level form was
# only correct for a layout where v.exe lives in a bin/ beside vlib/, and
# it happened to pass on the machine this was written on purely because
# that machine's `v` is a .bin\v.bat forwarder - which is exactly the
# kind of coincidence that stops being true on a fresh runner.
# the same directory as vlib/ (the step above puts the source root on
# PATH), so one level up from v.exe IS the vroot. The previous two-level
# form was only correct for a layout where v.exe lives in a bin/ beside
# vlib/, and it happened to pass on the machine this was written on
# purely because that machine's `v` is a .bin\v.bat forwarder - which is
# exactly the kind of coincidence that stops being true on a fresh
# runner.
run: |
v version
$vroot = Split-Path (Get-Command v).Source
if (-not (Test-Path (Join-Path $vroot 'vlib\json2'))) {
Write-Error "no vlib\json2 under $vroot - bridge/ and state/ import json2, so this V cannot build this repo. Pinned V version is 0.5.2; a newer V has it (see AGENTS.md 1b)"
Write-Error "no vlib\json2 under $vroot - bridge/ and state/ import json2, so this V cannot build this repo. The pinned commit should have it (see AGENTS.md 1b)"
exit 1
}
Write-Output "json2 present under $vroot"

- name: Install MSYS2 ucrt64 + the webview packages
run: |
choco install msys2 -y --no-progress
C:\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed mingw-w64-ucrt-x86_64-webview mingw-w64-ucrt-x86_64-webview2-loader"

- name: Put ucrt64 on PATH
# A separate step, and after the install, because ADR-0005's rule
# is about EVERY later step: without C:\msys64\ucrt64\bin on PATH
# even `cc1` cannot find its own DLLs, which fails as a SILENT gcc
# failure rather than a missing-symbol error. GITHUB_PATH only
# affects subsequent steps, which is exactly the scope wanted.
# SINGLE quotes, and they are load-bearing. A YAML double-quoted scalar
# processes backslash escapes, and `\m` is not one - so the double-quoted
# form of this line was not valid YAML at all. GitHub rejects the whole
# file, reports "This run likely failed because of a workflow file issue",
# and runs zero jobs in 0s. That is the second, distinct cause of the same
# symptom `buildplan/workflow_test.v` was written for: it caught the
# indentation break, and it cannot catch this, because a line-prefix check
# cannot see inside a scalar.
run: |
'C:\msys64\ucrt64\bin' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: v test .
# The `-ldflags` is not optional **on V 0.5.2**, which is what the winget
# step above installs, and the reason is a V bug rather than a repo one:
# V 0.5.2's `dependency_scan_fallback` link path emits `#flag`-sourced
# `-l` flags BEFORE most object files, and GNU ld only resolves an archive
# against the objects that precede it, so `net.http`'s `ws2_32` never
# resolves. It has to arrive as `-ldflags`, which is emitted last.
# The `-ldflags` is kept, and the reason it is kept is that it is
# VERSION-SCOPED rather than needed here. On V 0.5.2 it was not
# optional, because of a V bug rather than a repo one: 0.5.2's
# `dependency_scan_fallback` link path emits `#flag`-sourced `-l` flags
# BEFORE most object files, and GNU ld only resolves an archive against
# the objects that precede it, so `net.http`'s `ws2_32` never resolves.
# It has to arrive as `-ldflags`, which is emitted last.
#
# It is also unnecessary on a newer V, measured 2026-10-03 across 33 test
# files on V master — so the flag is here because of the compiler this job
# pins, not because the repo needs it. See AGENTS.md 1 and 1b.
# It is unnecessary on a newer V, measured 2026-10-03 across 33 test
# files on V master - and this job now pins master, so the flag is not
# doing any work. It stays because a command that works on both
# compilers is worth more than one that is minimal on the compiler we
# happen to pin this month: `buildplan.cli_flags` still emits it for
# exactly that reason, and the test that asserts it is what documents
# that it exists on purpose. Removing it means also removing the
# assertion, which turns a version difference into a mystery again.
run: v -cc gcc -ldflags "-lws2_32" test .

- name: build the CLI
# The `-cflags` on this step is the same story as the `-ldflags` above:
# needed on 0.5.2, unnecessary on the master this job pins, kept so one
# command serves both and `buildplan.cli_flags` stays truthful.
run: v -cc gcc -cflags "-Wno-incompatible-pointer-types" -ldflags "-lws2_32" -o vails.exe ./cli

- name: vails build produces a RUNNABLE binary
Expand Down
Loading
Loading