Repository navigation
feat: add go workspace for cross-module development - #5591
Conversation
Adds go.work covering v3 and webview2, enabling contributors to modify both modules in the same PR without first publishing a new webview2 release. The problem: any PR touching webview2/ and v3/ simultaneously (like #5462) failed CI because v3/go.mod pinned a published webview2 version that didn't include the PR's changes. The only workaround was to release webview2 first, then bump v3 — a painful two-step dance. Changes: - Add go.work + go.work.sum (removed from .gitignore so CI picks them up) - Remove GOWORK=off from build-and-test-v3.yml test_go and test_templates so PR CI resolves webview2 from the local workspace tree - Add webview2/**, go.work, go.work.sum to PR trigger paths so webview2 changes correctly trigger the v3 test suite - Update cache-dependency-path to include all module sums for better cache hits - Release workflows (nightly-release-v3, release-webview2, bump-webview2-v3) retain GOWORK=off so releases pin exact published versions - cross-compile-test-v3 retains GOWORK=off pending Docker mount integration
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (5)
WalkthroughThis PR enables Go workspace support across the Wails build system by removing workspace disables from CI, updating cache dependencies for workspace files, expanding workflow triggers to include webview2 changes, unignoring workspace configuration files, and updating webview2 Go module requirements for Go 1.25.0 compatibility. ChangesGo Workspace Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces a committed Go workspace to make cross-module development and PR CI work seamlessly across the v3/ and webview2/ Go modules without requiring an intermediate webview2 release.
Changes:
- Add
go.work+go.work.sum(and stop ignoring them) to enable a shared workspace for./v3and./webview2. - Update v3 CI workflows to run when
webview2/**or workspace files change, and improve Go module cache keys to include all relevant sum files. - Update
webview2module to Go1.25.0and bumpgolang.org/x/systov0.43.0(plus a smallv3/go.modtidy/indirect annotation change).
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
go.work |
Defines a workspace including ./v3 and ./webview2 for cross-module development/CI. |
go.work.sum |
Adds workspace-level dependency checksums for reproducible workspace resolution. |
.gitignore |
Stops ignoring go.work and go.work.sum so they can be committed and used in CI. |
.github/workflows/build-and-test-v3.yml |
Triggers on webview2/** + workspace changes; removes GOWORK=off to allow local workspace resolution; expands cache dependency paths. |
.github/workflows/cross-compile-test-v3.yml |
Triggers on webview2/** + workspace changes and expands cache dependency paths (while keeping GOWORK=off). |
webview2/go.mod |
Bumps Go version to 1.25.0 and golang.org/x/sys to v0.43.0. |
webview2/go.sum |
Updates checksum for golang.org/x/sys version bump. |
v3/go.mod |
Marks github.com/muesli/termenv as indirect (module tidy alignment). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Adds
go.work(committed to the repo) so contributors and CI can work acrossv3andwebview2modules simultaneously without needing to publish a newwebview2release first.Problem: Any PR that modifies both
webview2/andv3/(e.g. #5462) failed CI becausev3/go.modpinned a publishedwebview2version that didn't include the PR's changes. The only workaround was a painful two-step: releasewebview2first, bumpv3, then re-test.Solution:
go.work+go.work.sumcovering./v3and./webview2; remove both from.gitignoreso CI picks them upGOWORK=offfrombuild-and-test-v3.yml(test_go,test_templates) so PR CI resolveswebview2from the local workspace treewebview2/**,go.work,go.work.sumto PR trigger paths sowebview2-only changes correctly trigger the v3 test suitecache-dependency-pathto cover all module sums for better cache hit ratesnightly-release-v3,release-webview2,bump-webview2-v3) retainGOWORK=off— releases must pin exact published versionscross-compile-test-v3retainsGOWORK=offpending Docker mount integrationRelease flow (unchanged)
webview2changes →release-webview2.ymltagswebview2/vX.Y.Z→bump-webview2-v3.ymlopens PR bumpingv3/go.mod→ next nightly picks it up. Versions remain independently releasable;go.workis purely for local dev and PR CI.Fixes CI failures for cross-module PRs like #5462.
Summary by CodeRabbit