-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[META] Go 1.16 #2067
Comments
We also need before that just to clarify, have the same bump in controller-runtime, declarative-kb and k8s-api before we are able to address that here. |
The # would work in GO1.16
generate:
## Download controller-gen locally if necessary.
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1
## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." or you plan to support older GO versions (stay with # without GO1.16
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
|
@kuritka AFAIK, |
1.16 is backwards compatible, so are there really any blockers here? Removing |
I believe I found a blocker: our test matrix. I think some bug fixes (features?) in go 1.16 made module installation more strict (see https://github.com/kubernetes-sigs/kubebuilder/pull/2182/checks?check_run_id=2614771863#step:6:520), which results in errors in go/v2 tests. For full backwards-compatibility, we'll likely want to start running all tests in Edit: adding |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Both the /close |
@estroz: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issue aims to tracks all the changes that need to/can be done once moving to go 1.16. This is obviously gated by dependencies.
GO111MODULES
toon
by default instead ofauto
. There are several remanents of this env variable that we should remove throughout the codebase.embed
package that allows to embed files into the binary using//go:...
-style comments. This allows to split the files template from their logic offering way better support by IDEs (templates will no longer be a string, so they will be styled, auto-completed, and all the goodness of IDEs).If there is any other feature enabled/required by go 1.16 that you will like to see in this list, please comment and I will update the list.
The text was updated successfully, but these errors were encountered: