diff --git a/v2/cmd/wails/internal/commands/build/build.go b/v2/cmd/wails/internal/commands/build/build.go index 76749c76658..23bc9379659 100644 --- a/v2/cmd/wails/internal/commands/build/build.go +++ b/v2/cmd/wails/internal/commands/build/build.go @@ -146,6 +146,13 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) { } } + // Validate experimental + if slicer.String([]string{"hybrid", "server"}).Contains(outputType) { + if !slicer.String(userTags).Contains("exp") { + return fmt.Errorf("output type '%s' requires the '-tags exp'", outputType) + } + } + // Webview2 installer strategy (download by default) wv2rtstrategy := "" webview2 = strings.ToLower(webview2) diff --git a/v2/internal/app/app_hybrid_server.go b/v2/internal/app/app_hybrid_server.go index 269ce9c72ff..a9a7b135ec6 100644 --- a/v2/internal/app/app_hybrid_server.go +++ b/v2/internal/app/app_hybrid_server.go @@ -1,5 +1,5 @@ -//go:build hybrid || server -// +build hybrid server +//go:build (exp && hybrid) || (exp && server) +// +build exp,hybrid exp,server package app diff --git a/v2/internal/frontend/hybrid/hybrid.go b/v2/internal/frontend/hybrid/hybrid.go index 55f1521de5d..6dfe3c4a838 100644 --- a/v2/internal/frontend/hybrid/hybrid.go +++ b/v2/internal/frontend/hybrid/hybrid.go @@ -1,5 +1,5 @@ -//go:build hybrid -// +build hybrid +//go:build exp && hybrid +// +build exp,hybrid package hybrid diff --git a/v2/internal/frontend/hybrid/server.go b/v2/internal/frontend/hybrid/server.go index 75f1a750da9..cd83fbf98aa 100644 --- a/v2/internal/frontend/hybrid/server.go +++ b/v2/internal/frontend/hybrid/server.go @@ -1,5 +1,5 @@ -//go:build server -// +build server +//go:build exp && server +// +build exp,server package hybrid