Compare commits

...

5 Commits

Author SHA1 Message Date
Lea Anthony
8b5bcdfeff [v2] v2.0.0-beta.11 2021-10-11 19:24:04 +11:00
Lea Anthony
f6655d019f [v2] Better errors 2021-10-11 19:23:31 +11:00
Lea Anthony
8f31183fa8 [v2] Fix client timeouts 2021-10-11 19:23:31 +11:00
Lea Anthony
64528b4f02 Merge pull request #863 from marcus-crane/master
Correct help text for enabling Debug log level
2021-10-11 17:56:25 +11:00
Marcus Crane
7945853294 Correct help text for enabling Debug log level
All in forms of documentation, the correct name for the second most verbose log level is "Debug" but under `wails dev --help`, it's called Dev

Trying to use it throws an error as well so correcting the name to be Debug
2021-10-11 13:31:28 +13:00
7 changed files with 19 additions and 14 deletions

View File

@@ -88,7 +88,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
command.StringFlag("wailsjsdir", "Directory to generate the Wails JS modules", &flags.wailsjsdir)
command.StringFlag("tags", "tags to pass to Go compiler (quoted and space separated)", &flags.tags)
command.IntFlag("v", "Verbosity level (0 - silent, 1 - standard, 2 - verbose)", &flags.verbosity)
command.StringFlag("loglevel", "Loglevel to use - Trace, Dev, Info, Warning, Error", &flags.loglevel)
command.StringFlag("loglevel", "Loglevel to use - Trace, Debug, Info, Warning, Error", &flags.loglevel)
command.BoolFlag("f", "Force build application", &flags.forceBuild)
command.IntFlag("debounce", "The amount of time to wait to trigger a reload on change", &flags.debounceMS)
command.StringFlag("devserverurl", "The url of the dev server to use", &flags.devServerURL)

View File

@@ -1,6 +1,7 @@
package generate
import (
"fmt"
"github.com/leaanthony/clir"
"github.com/wailsapp/wails/v2/cmd/wails/internal"
"github.com/wailsapp/wails/v2/internal/shell"
@@ -36,14 +37,14 @@ func AddModuleCommand(app *clir.Cli, parent *clir.Command, w io.Writer) error {
tagList := internal.ParseUserTags(tags)
tagList = append(tagList, "bindings")
_, _, err = shell.RunCommand(cwd, "go", "build", "-tags", strings.Join(tagList, ","), "-o", filename)
stdout, stderr, err := shell.RunCommand(cwd, "go", "build", "-tags", strings.Join(tagList, ","), "-o", filename)
if err != nil {
return err
return fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
}
_, _, err = shell.RunCommand(cwd, filename)
stdout, stderr, err = shell.RunCommand(cwd, filename)
if err != nil {
return err
return fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
}
err = os.Remove(filename)

View File

@@ -1,3 +1,3 @@
package internal
var Version = "v2.0.0-beta.10"
var Version = "v2.0.0-beta.11"

View File

@@ -306,6 +306,10 @@ func (d *DevWebServer) broadcast(message string) {
d.socketMutex.Lock()
defer d.socketMutex.Unlock()
for client := range d.websocketClients {
if client == nil {
d.logger.Error("Lost connection to websocket server")
return
}
err := client.WriteMessage(websocket.TextMessage, []byte(message))
if err != nil {
d.logger.Error(err.Error())

View File

@@ -75,7 +75,7 @@ const basicUpdated string = `module changeme
go 1.17
require github.com/wailsapp/wails/v2 v2.0.0-beta.10
require github.com/wailsapp/wails/v2 v2.0.0-beta.11
require (
github.com/andybalholm/brotli v1.0.2 // indirect
@@ -159,7 +159,7 @@ const multilineRequireUpdated = `module changeme
go 1.17
require (
github.com/wailsapp/wails/v2 v2.0.0-beta.10
github.com/wailsapp/wails/v2 v2.0.0-beta.11
)
require (
@@ -210,8 +210,8 @@ func TestUpdateGoModVersion(t *testing.T) {
want []byte
wantErr bool
}{
{"basic", args{[]byte(basic), "v2.0.0-beta.10"}, []byte(basicUpdated), false},
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.10"}, []byte(multilineRequireUpdated), false},
{"basic", args{[]byte(basic), "v2.0.0-beta.11"}, []byte(basicUpdated), false},
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.11"}, []byte(multilineRequireUpdated), false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@@ -238,8 +238,8 @@ func TestGoModOutOfSync(t *testing.T) {
want bool
wantErr bool
}{
{"basic", args{[]byte(basic), "v2.0.0-beta.10"}, true, false},
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.10"}, true, false},
{"basic", args{[]byte(basic), "v2.0.0-beta.11"}, true, false},
{"basicmultiline", args{[]byte(multilineRequire), "v2.0.0-beta.11"}, true, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {

View File

@@ -62,7 +62,7 @@ import TabItem from "@theme/TabItem";
## Installing Wails
Run `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.10` to install the Wails CLI.
Run `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.11` to install the Wails CLI.
## System Check

View File

@@ -63,7 +63,7 @@ import TabItem from "@theme/TabItem";
## 安装 Wails
运行 `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.10` 安装 Wails CLI。
运行 `go install github.com/wailsapp/wails/v2/cmd/wails@v2.0.0-beta.11` 安装 Wails CLI。
## 系统检查