wire icon indicating copy to clipboard operation
wire copied to clipboard

go build -mod=vendor ./cmd/wire doesn't work after update to 0.6.0

Open dsh2dsh opened this issue 1 year ago • 1 comments

You can use go bug to have a cool, automatically filled out bug template, or fill out the template below.

Describe the bug

go build -mod=vendor ./cmd/wire doesn't work after update to 0.6.0

To Reproduce

go mod vendor
go build -mod=vendor ./cmd/wire

# golang.org/x/tools/internal/event/keys
vendor/golang.org/x/tools/internal/event/keys/util.go:14:11: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:14:13: embedding interface element ~[]T requires go1.18 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:14:21: embedding interface element ~string requires go1.18 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:15:32: invalid argument: s (variable of type S constrained by ~[]T) for len
vendor/golang.org/x/tools/internal/event/keys/util.go:16:20: cannot range over s (variable of type S constrained by ~[]T): no core type
# golang.org/x/tools/internal/versions
vendor/golang.org/x/tools/internal/versions/types.go:15:16: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)

Expected behavior

I'm expecting successful build.

Version

0.6.0

Additional context

The fix would be bump go version in go.mod from 1.12 to 1.18.

dsh2dsh avatar Feb 20 '24 22:02 dsh2dsh

@vangent @zombiezen @shantuo wanted to make sure this is visible. We have this problem as well

saviorand avatar Nov 28 '24 10:11 saviorand