desktop: ship wailsapp/wails#6006 from a fork until it merges - #78
Merged
Conversation
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>
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.
Pins
desktop/'s wails to a fork branch that isv3.0.0-beta.12pluswailsapp/wails#6006 — two commits, ten lines in one file — and nothing else.
Why it is reachable here.
webview_window_windows.goregisters a"*"WebResourceRequestedfilter for asset serving, so on Windows every request theWebView makes runs through
edge.Chromium's handler. That handler calledlog.Fatal(err)whenargs.GetRequest()failed: one transient COM failure on onerequest kills gadak, skips deferred cleanup, and never reaches the error callback
wails' own
SetErrorCallbackconfigures.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
replacecomment 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 localgates 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