#3369·hub

update minimum go version

Author: shinenelsonCreated Feb 22, 2025Updated Feb 23, 2025
Labelsbug

I was attempting to compile go from source using the latest HEAD. But I could not get the compilation to complete because it required a minimum version higher than the one specified in go.mod.

https://github.com/mislav/hub/blob/5c547ed804368763064e51f3990851e267e88edd/go.mod#L3

go mod specifies go1.11 as the version that the source builds on, but while attempting a build, it fails. I was attempting a build using go1.14 which was higher than the minimum version. Using go1.17 resolved the error and completed the build successfully.

Command attempted: make bin/hub

What happened:

/home/shine/go/pkg/mod/golang.org/x/[email protected]/unix/syscall.go:83:16: undefined: unsafe.Slice
/home/shine/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:2271:9: undefined: unsafe.Slice
/home/shine/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
/home/shine/go/pkg/mod/golang.org/x/[email protected]/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
note: module requires Go 1.17
make: *** [Makefile:51: bin/hub] Error 2

Steps to Reproduce use any go version < go1.17.

  1. git clone https://github.com/mislav/hub
  2. make bin/hub

I can create a pull request if this is a valid bug and the version in go.mod needs updating.