Skip to content

Commit a5c32a1

Browse files
5aaee9leaanthony
andauthored
[v3] allow build with garble (#3192)
* feat: allow build with garble * docs: update * Updated docs --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
1 parent 1f9f8da commit a5c32a1

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

docs/src/content/docs/changelog.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5252
- Fix event handling by [@leaanthony](https://github.com/leaanthony)
5353
- Fixed window shutdown logic by [@leaanthony](https://github.com/leaanthony)
5454
- Common taskfile now defaults to generating Typescript bindings for Typescript templates by [@leaanthony](https://github.com/leaanthony)
55+
- Fixed garble build by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192)
5556

5657
### Changed
5758

mkdocs-website/docs/en/changelog.md

Whitespace-only changes.

v3/internal/go-common-file-dialog/cfd/DialogConfig.go

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package cfd
44

55
import (
6+
"reflect"
67
"fmt"
78
"os"
89
)
@@ -14,6 +15,9 @@ type FileFilter struct {
1415
Pattern string
1516
}
1617

18+
// Never obfuscate the FileFilter type.
19+
var _ = reflect.TypeOf(FileFilter{})
20+
1721
type DialogConfig struct {
1822
// The title of the dialog
1923
Title string

v3/pkg/application/application_debug.go

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ func newApplication(options Options) *App {
4040
func (a *App) logStartup() {
4141
var args []any
4242

43+
// BuildInfo is nil when build with garble
44+
if BuildInfo == nil {
45+
return
46+
}
47+
4348
wailsPackage, _ := lo.Find(BuildInfo.Deps, func(dep *debug.Module) bool {
4449
return dep.Path == "github.com/wailsapp/wails/v3"
4550
})

0 commit comments

Comments
 (0)