artemiscloud / activemq-artemis-operator

Apache License 2.0
69 stars 63 forks source link

Make: building fails with go 1.21.8 #845

Closed lavocatt closed 7 months ago

lavocatt commented 7 months ago

Building with the golang version 1.21.8 leads to errors:

make build
test -s /home/tlavocat/dev/activemq-artemis-operator/bin/controller-gen && /home/tlavocat/dev/activemq-artemis-operator/bin/controller-gen --version | grep -q v0.11.2 || \
GOBIN=/home/tlavocat/dev/activemq-artemis-operator/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.2
/home/tlavocat/dev/activemq-artemis-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet -composites=false ./...
go: updates to go.mod needed; to update it:
    go mod tidy
make: *** [Makefile:137: vet] Error 1

After discussing the issue with @brusdev, we propose to add some checks at the beginning of the build process based on the content of the go.mod file to check that the used go version is in a range of supported versions.

brusdev commented 7 months ago

Resolved by https://github.com/artemiscloud/activemq-artemis-operator/commit/fe5b44439d054eb620c1c74b204b12490703a735