Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.35k stars 71 forks source link

Current minimum required go version is at least 1.20 #277

Open RJVB opened 5 months ago

RJVB commented 5 months ago

https://github.com/Foxboron/sbctl/blob/ee7cf4a33c6fb3be8f192641420d8c4234f7ae31/README.md?plain=1#L35

Building with go 1.17.13:

> go install github.com/foxboron/sbctl/cmd/sbctl@latest
go: downloading github.com/foxboron/sbctl v0.0.0-20231223220248-ee7cf4a33c6f
go: downloading github.com/foxboron/go-uefi v0.0.0-20230808201820-18b9ba9cd4c3
go: downloading github.com/spf13/afero v1.9.3
go: downloading github.com/spf13/cobra v1.1.3
go: downloading github.com/google/go-attestation v0.3.3-0.20210901195502-505680f536da
go: downloading github.com/google/uuid v1.3.0
go: downloading golang.org/x/sys v0.5.0
go: downloading github.com/fatih/color v1.13.0
go: downloading golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
go: downloading golang.org/x/text v0.7.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/mattn/go-colorable v0.1.12
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading github.com/google/certificate-transparency-go v1.1.2
go: downloading github.com/google/go-tpm v0.3.2
go: downloading github.com/google/go-tspi v0.3.0
go: downloading golang.org/x/crypto v0.6.0
# golang.org/x/exp/constraints
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:13:2: syntax error: unexpected ~, expecting method or interface name
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:20:2: syntax error: unexpected ~, expecting method or interface name
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:27:9: syntax error: unexpected |, expecting semicolon or newline or }
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:34:2: syntax error: unexpected ~, expecting method or interface name
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:41:2: syntax error: unexpected ~, expecting method or interface name
../../../go/pkg/mod/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1/constraints/constraints.go:49:10: syntax error: unexpected |, expecting semicolon or newline or }
note: module requires Go 1.20
Exit 2
Foxboron commented 5 months ago

Should probably be changed, but please defer to https://github.com/Foxboron/sbctl/blob/master/go.mod#L3 for the supported version.

RJVB commented 5 months ago

but please defer to https://github.com/Foxboron/sbctl/blob/master/go.mod#L3 for the supported version.

I'm guessing most who try to follow the instructions in the README are as unfamiliar with Go as I am...

I'm also guessing it isn't possible to stick the minimum required version in a specific file from where it can be referenced by the README (other than with the link above)? ;)

hueychen27 commented 5 months ago

Install golang-1.21-go That fixed the issue for me

RJVB commented 5 months ago

Install golang-1.21-go That fixed the issue for me

I pulled down the proper release build tarball (and wondered why I didn't check if that worked first) ;)