Skip to content

desktop: ship wailsapp/wails#6006 from a fork until it merges - #78

Merged
midagedev merged 2 commits into
mainfrom
wails-6006-fork
Aug 29, 2026
Merged

desktop: ship wailsapp/wails#6006 from a fork until it merges#78
midagedev merged 2 commits into
mainfrom
wails-6006-fork

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Pins desktop/'s wails to a fork branch that is v3.0.0-beta.12 plus
wailsapp/wails#6006 — two commits, ten lines in one file — and nothing else.

Why it is reachable here. webview_window_windows.go registers a "*"
WebResourceRequested filter for asset serving, so on Windows every request the
WebView makes runs through edge.Chromium's handler. That handler called
log.Fatal(err) when args.GetRequest() failed: one transient COM failure on one
request kills gadak, skips deferred cleanup, and never reaches the error callback
wails' own SetErrorCallback configures.

Why a fork. The PR is open, mergeable, and unblocked — its single review comment
was addressed and resolved the same day. It is waiting on a maintainer.

Expiry. The replace comment says to delete it when the PR lands in a beta we take.
Every wails bump redoes the branch (fetch tag → cherry-pick → tag -gadak.N+1) until then.

This is a PR rather than a direct push because desktop/ is one of the things local
gates cannot run — the Windows build (windows-latest) and the Linux build
(GTK4 · WebKitGTK · AppImage) are the verdict being sought.

Local: go mod tidy, go build ./... (darwin), GOOS=windows go build ./...,
go vet, gofmt — and the patched source confirmed present in the resolved module.
The linux cross-build fails from macOS for the same GTK/cgo reason it does on stock
beta.12 (checked against the unmodified go.mod).

🤖 Generated with Claude Code

midagedev and others added 2 commits August 30, 2026 01:42
wails' webview_window_windows.go registers a "*" WebResourceRequested
filter for asset serving, so on Windows every request the WebView makes
runs through edge.Chromium's handler — and that handler called
log.Fatal(err) when args.GetRequest() failed. One transient COM failure on
one request killed gadak, skipping deferred cleanup, and log.Fatal does not
even reach the error callback wails' own SetErrorCallback configures. There
is a second mode in the same branch: the COM call can return S_OK without
setting the out pointer, which makes `defer req.Release()` a nil-pointer
release (wails#1103's field crash trace).

The fix is ten lines and has been open upstream since 2026-08-19, unblocked
— its one review comment was addressed and resolved the same day. It is
waiting on a maintainer. gadak does not have to (user decision 2026-08-30).

So: github.com/midagedev/wails, branch gadak/v3.0.0-beta.12 — the upstream
tag with those two commits cherry-picked, nothing else — tagged
v3.0.0-beta.12-gadak.1, and pinned here by a replace whose comment says
which PR, why it is reachable in gadak, and to delete it when it merges. A
replace with no expiry is how a fork becomes permanent by accident.

Two measured facts are in docs/runbooks/upstream-pr.md, because this will
happen again: the fork's go.mod module line stays as upstream's (Go
resolves the package path from the original module path, so no import
rewriting — the folklore answer would break every internal import), and the
branch must be TAGGED or `go mod tidy` derives a pseudo-version from the
nearest tag reachable in the fork, which read `v3.0.0-beta.9.0.2026…` for a
branch cut from beta.12.

Verified: go mod tidy, go build ./... (darwin), GOOS=windows go build ./...,
go vet, gofmt — and the patched source is the one in the module cache. The
linux cross-build fails from macOS for the same GTK/cgo reason it does on
stock beta.12 (checked against the unmodified go.mod); the Linux desktop
job is why this is a PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
TestWailsModuleVersionMatchesGoMod compared debug.ReadBuildInfo()'s wails
version against go.mod's require line. With the #6006 fork replace those
legitimately differ: wailsModuleVersion() prefers Replace.Version by
design — it reports what actually linked — while the require line keeps
naming the upstream base the fork is cut from. So the gate went red on
the commit that added the replace.

Narrowed rather than relaxed. The gate now reads the replace line too,
and asserts the fork version is prefixed by the required upstream
version, so v3.0.0-beta.12-gadak.1 passes while a fork silently cut from
a different base fails with the reason spelled out. FAIL-first, both
halves measured: the original failure is PR #78's "Desktop tests" job,
and pointing the require line at beta.11 with the replace untouched
reproduces the new branch.

TestPinnedWailsVersionIsNamed is untouched — main.go, README.md and
build-windows.ps1 still have to name the upstream base, which is the
version whose behaviour those comments describe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@midagedev
midagedev merged commit c820958 into main Aug 29, 2026
12 checks passed
@midagedev
midagedev deleted the wails-6006-fork branch August 29, 2026 16:59
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