Skip to content

Commit f87ff5b

Browse files
refactor(v3): fold webview2 module into v3/internal/webview2 (#5711)
The webview2 binding was a separate Go module (github.com/wailsapp/wails/webview2) whose only consumer is v3. Keeping it separate forced a release dance: tag webview2, then bump v3's go.mod (automated via a nightly sync workflow) before any binding change could ship in a v3 release. Fold it into the v3 module under internal/ (compiler-enforced no external import), which removes the dance entirely: edit-and-go, single module. - git mv webview2 -> v3/internal/webview2; drop its go.mod/go.sum - rewrite import paths in the binding + 11 v3 consumers - drop ./webview2 from go.work; go mod tidy (go-winloader now direct) - add missing //go:build windows to 8 edge files that lacked it (latent: the binding was never part of v3's cross-platform 'go build ./...' before) - CI: delete release-webview2.yml, remove the webview2-sync step from the v3 nightly, drop webview2/** triggers and webview2/go.sum cache keys For v4 the plan is to copy the directory in rather than share a module. Co-authored-by: taliesin-ai <lea.anthony@gmail.com>
1 parent 1913ff3 commit f87ff5b

467 files changed

Lines changed: 52 additions & 85 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.work

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ go 1.25.0
22

33
use (
44
./v3
5-
./webview2
65
)

v3/UNRELEASED_CHANGELOG.md

Lines changed: 1 addition & 0 deletions

v3/go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ require (
3030
github.com/stretchr/testify v1.11.1
3131
github.com/tc-hib/winres v0.3.1
3232
github.com/wailsapp/task/v3 v3.40.1-patched3
33-
github.com/wailsapp/wails/webview2 v1.0.28
3433
github.com/zalando/go-keyring v0.2.6
3534
golang.org/x/sys v0.43.0
3635
golang.org/x/term v0.42.0
@@ -109,7 +108,7 @@ require (
109108
github.com/huandu/xstrings v1.5.0 // indirect
110109
github.com/jaypipes/pcidb v1.1.1 // indirect
111110
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
112-
github.com/jchv/go-winloader v0.0.0-20250406163304-c1995be93bd1 // indirect
111+
github.com/jchv/go-winloader v0.0.0-20250406163304-c1995be93bd1
113112
github.com/joho/godotenv v1.5.1 // indirect
114113
github.com/kevinburke/ssh_config v1.4.0 // indirect
115114
github.com/klauspost/compress v1.18.3 // indirect

v3/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
356356
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
357357
github.com/wailsapp/task/v3 v3.40.1-patched3 h1:i6O1WNdSur9CGaiMDIYGjsmj/qS4465zqv+WEs6sPRs=
358358
github.com/wailsapp/task/v3 v3.40.1-patched3/go.mod h1:jIP48r8ftoSQNlxFP4+aEnkvGQqQXqCnRi/B7ROaecE=
359-
github.com/wailsapp/wails/webview2 v1.0.28 h1:rWBjaGGfzqVOH7TPy1s9VoP8jWNz0gmBd8ZkUKHi0qQ=
360-
github.com/wailsapp/wails/webview2 v1.0.28/go.mod h1:zdM4jcO1IaC61RiJL5F1BzgoqBHFIdacz8gPr5exr0o=
361359
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
362360
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
363361
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=

v3/internal/assetserver/webview/request_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"io"
99
"net/http"
1010

11-
"github.com/wailsapp/wails/webview2/pkg/edge"
11+
"github.com/wailsapp/wails/v3/internal/webview2/pkg/edge"
1212
)
1313

1414
// NewRequest creates as new WebViewRequest for chromium. This Method must be called from the Main-Thread!

v3/internal/capabilities/capabilities_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package capabilities
44

5-
import "github.com/wailsapp/wails/webview2/webviewloader"
5+
import "github.com/wailsapp/wails/v3/internal/webview2/webviewloader"
66

77
type version string
88

v3/internal/doctor/doctor_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88

99
"github.com/wailsapp/wails/v3/internal/lo"
10-
"github.com/wailsapp/wails/webview2/webviewloader"
10+
"github.com/wailsapp/wails/v3/internal/webview2/webviewloader"
1111
)
1212

1313
func getInfo() (map[string]string, bool) {
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)