Skip to content

feat: add go workspace for cross-module development - #5591

Merged
leaanthony merged 1 commit into
masterfrom
feat/go-workspace
Jun 13, 2026
Merged

leaanthony merged 1 commit into
masterfrom
feat/go-workspace

Conversation

@leaanthony

@leaanthony leaanthony commented Jun 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds go.work (committed to the repo) so contributors and CI can work across v3 and webview2 modules simultaneously without needing to publish a new webview2 release first.

Problem: Any PR that modifies both webview2/ and v3/ (e.g. #5462) failed CI because v3/go.mod pinned a published webview2 version that didn't include the PR's changes. The only workaround was a painful two-step: release webview2 first, bump v3, then re-test.

Solution:

  • Add go.work + go.work.sum covering ./v3 and ./webview2; remove both from .gitignore so CI picks them up
  • Remove GOWORK=off from build-and-test-v3.yml (test_go, 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-only changes correctly trigger the v3 test suite
  • Update cache-dependency-path to cover all module sums for better cache hit rates
  • Release workflows (nightly-release-v3, release-webview2, bump-webview2-v3) retain GOWORK=off — releases must pin exact published versions
  • cross-compile-test-v3 retains GOWORK=off pending Docker mount integration

Release flow (unchanged)

webview2 changes → release-webview2.yml tags webview2/vX.Y.Z → bump-webview2-v3.yml opens PR bumping v3/go.mod → next nightly picks it up. Versions remain independently releasable; go.work is purely for local dev and PR CI.

Fixes CI failures for cross-module PRs like #5462.

Summary by CodeRabbit

  • Chores
    • Enhanced build and test workflows to improve Go module handling with better caching strategies.
    • Broadened path filters in CI/CD pipelines to include additional module directories.
    • Updated Go version requirement to 1.25.0 for webview2 and upgraded system-related dependencies.
    • Updated repository configuration to properly track workspace files.

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
Copilot AI review requested due to automatic review settings June 13, 2026 11:07
@coderabbitai

coderabbitai Bot commented Jun 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 22d622e6-23ce-4407-9cbc-efdb188e404e

📥 Commits

Reviewing files that changed from the base of the PR and between 51f951b and 70ea811.

⛔ Files ignored due to path filters (3)
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • webview2/go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • .github/workflows/build-and-test-v3.yml
  • .github/workflows/cross-compile-test-v3.yml
  • .gitignore
  • v3/go.mod
  • webview2/go.mod

Walkthrough

This 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.

Changes

Go Workspace Integration

Layer / File(s) Summary
Build and test workflow updates
.github/workflows/build-and-test-v3.yml, .github/workflows/cross-compile-test-v3.yml
Both workflows expand pull_request and pull_request_review path filters to trigger on webview2/**, go.work, and go.work.sum changes. The test_go and test_templates jobs in build-and-test-v3 remove the GOWORK: "off" environment override. Go setup cache configuration is updated from depending on v3/go.sum alone to depending on v3/go.sum, webview2/go.sum, and go.work.sum in all three jobs.
Workspace file visibility and Go module updates
.gitignore, v3/go.mod, webview2/go.mod
.gitignore removes entries for go.work and go.work.sum to track workspace files. v3/go.mod marks github.com/muesli/termenv v0.16.0 as // indirect. webview2/go.mod updates the Go toolchain requirement to 1.25.0 and bumps golang.org/x/sys from v0.40.0 to v0.43.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • wailsapp/wails#5280: Both PRs modify the same GitHub Actions workflows to expand path filters for v3, webview2, and Go workspace files that trigger test execution.
  • wailsapp/wails#5150: Both PRs update GitHub Actions CI workflows to adjust Go setup/caching behavior, including cache-dependency-path configuration for Go module sums.
  • wailsapp/wails#5149: Both PRs modify .github/workflows/build-and-test-v3.yml with updates to the test_go job's actions/setup-go caching configuration.

Suggested reviewers

  • atterpac

Poem

🐰 A workspace unified, now shared with care,
Go modules dance through webview2's air,
No more forced "off"—let harmony reign,
Cache grows wiser, dependencies plain,
The v3 warren now roams as one pair! 🌿

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/go-workspace

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@leaanthony
leaanthony merged commit 51aaf5b into master Jun 13, 2026
14 of 16 checks passed
@leaanthony
leaanthony deleted the feat/go-workspace branch June 13, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ./v3 and ./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 webview2 module to Go 1.25.0 and bump golang.org/x/sys to v0.43.0 (plus a small v3/go.mod tidy/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.

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.

2 participants