Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wails CLI V2 go install failed on MacOS 10.15 #1882

Closed
sean220 opened this issue Sep 23, 2022 · 8 comments
Closed

Wails CLI V2 go install failed on MacOS 10.15 #1882

sean220 opened this issue Sep 23, 2022 · 8 comments

Comments

@sean220
Copy link

sean220 commented Sep 23, 2022

go version 1.18

go install github.com/wailsapp/wails/v2/cmd/wails@latest

.../go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:13:2: embedding interface element ~int|~int8|~int16|~int32|~int64 requires go1.18 or later (-lang was set to go1.16; check go.mod)
.../go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:20:2: embedding interface element ~uint|~uint8|~uint16|~uint32|~uint64|~uintptr requires go1.18 or later (-lang was set to go1.16; check go.mod)
...go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:27:2: embedding interface element Signed|Unsigned requires go1.18 or later (-lang was set to go1.16; check go.mod)
.../go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:34:2: embedding interface element ~float32|~float64 requires go1.18 or later (-lang was set to go1.16; check go.mod)
.../go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:41:2: embedding interface element ~complex64|~complex128 requires go1.18 or later (-lang was set to go1.16; check go.mod)
.../go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:49:2: embedding interface element Integer|Float|~string requires go1.18 or later (-lang was set to go1.16; check go.mod)

@stffabi
Copy link
Collaborator

stffabi commented Sep 23, 2022

Thanks for using Wails and reporting this.

Unfortunately I'm unable to reproduce this, neither with go 1.18.0 nor with go 1.18.6. What's your exact go version? Have you tried cleaning your go cache with go clean -modcache?

@sean220
Copy link
Author

sean220 commented Sep 23, 2022

after go clean -modcache,it still reports the same error,the log is as follows
go1.18 darwin/amd64

➜ ~ go clean -modcache
➜ ~ go install github.com/wailsapp/wails/v2/cmd/wails@latest
go: downloading github.com/wailsapp/wails v1.16.9
go: downloading github.com/wailsapp/wails/v2 v2.0.0
go: downloading github.com/leaanthony/clir v1.0.4
go: downloading github.com/flytam/filenamify v1.0.0
go: downloading github.com/leaanthony/slicer v1.5.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/labstack/gommon v0.3.1
go: downloading github.com/wzshiming/ctc v1.2.3
go: downloading github.com/samber/lo v1.27.1
go: downloading github.com/leaanthony/gosod v1.0.3
go: downloading github.com/leaanthony/debme v1.2.1
go: downloading github.com/tidwall/sjson v1.1.7
go: downloading github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2
go: downloading github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
go: downloading golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57
go: downloading github.com/jackmordaunt/icns v1.0.0
go: downloading github.com/leaanthony/winicon v1.0.0
go: downloading github.com/tc-hib/winres v0.1.5
go: downloading github.com/charmbracelet/glamour v0.5.0
go: downloading github.com/go-git/go-git/v5 v5.3.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae
go: downloading github.com/mattn/go-colorable v0.1.11
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17
go: downloading github.com/tidwall/gjson v1.8.0
go: downloading golang.org/x/image v0.0.0-20201208152932-35266b937fa6
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading github.com/go-git/go-billy/v5 v5.2.0
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/sergi/go-diff v1.1.0
go: downloading golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
go: downloading github.com/muesli/termenv v0.9.0
go: downloading github.com/yuin/goldmark v1.4.4
go: downloading github.com/yuin/goldmark-emoji v1.0.1
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/emirpasic/gods v1.12.0
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading github.com/tidwall/match v1.0.3
go: downloading github.com/tidwall/pretty v1.1.0
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/microcosm-cc/bluemonday v1.0.17
go: downloading github.com/muesli/reflow v0.3.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/go-git/gcfg v1.5.0
go: downloading github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351
go: downloading github.com/xanzy/ssh-agent v0.3.0
go: downloading golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading gopkg.in/warnings.v0 v0.1.2
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading github.com/gorilla/css v1.0.0
go: downloading github.com/dlclark/regexp2 v1.4.0

golang.org/x/exp/constraints

go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:13:2: embedding interface element ~int|~int8|~int16|~int32|~int64 requires go1.18 or later (-lang was set to go1.16; check go.mod)
go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:20:2: embedding interface element ~uint|~uint8|~uint16|~uint32|~uint64|~uintptr requires go1.18 or later (-lang was set to go1.16; check go.mod)
go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:27:2: embedding interface element Signed|Unsigned requires go1.18 or later (-lang was set to go1.16; check go.mod)
go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:34:2: embedding interface element ~float32|~float64 requires go1.18 or later (-lang was set to go1.16; check go.mod)
go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:41:2: embedding interface element ~complex64|~complex128 requires go1.18 or later (-lang was set to go1.16; check go.mod)
go/pkg/mod/golang.org/x/exp@v0.0.0-20220303212507-bbda1eaf7a17/constraints/constraints.go:49:2: embedding interface element Integer|Float|~string requires go1.18 or later (-lang was set to go1.16; check go.mod)

@leaanthony
Copy link
Member

When reporting bugs, please give the output of wails doctor as the template requests. Looking at the logs, you are not using Go 1.18 or above.

@sean220
Copy link
Author

sean220 commented Sep 23, 2022

This is a failure to install the wails cli, so I can't execute the [wails doctor] command at all. I just tried to upgrade golang to 1.19, and the error is still there. Since the go install command has nothing to do with the mod configuration of the project, is there a problem with dependencies?

From the direct error message in the log, is it related to golang.org/x/exp?

@stffabi
Copy link
Collaborator

stffabi commented Sep 23, 2022

Could you post your 'go env' output?

@stffabi
Copy link
Collaborator

stffabi commented Sep 23, 2022

I can reproduce it when using go install -mod=readonly github.com/wailsapp/wails/v2/cmd/wails@latest which seems to be an issue with Go golang/go#54908

@sean220 do you probably use GOFLAGS=-mod=readonly in your environment?

@sean220
Copy link
Author

sean220 commented Sep 23, 2022

I can reproduce it when using go install -mod=readonly github.com/wailsapp/wails/v2/cmd/wails@latest which seems to be an issue with Go golang/go#54908

@sean220 do you probably use GOFLAGS=-mod=readonly in your environment?

Thanks, indeed caused by GOFLAGS,it works.

@stffabi
Copy link
Collaborator

stffabi commented Sep 23, 2022

Great that it works for you.

I'm closing this issue, because it's beyond our control and should get fixed with golang/go#54908

@stffabi stffabi closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
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

No branches or pull requests

3 participants