-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support go 1.16 module aware install with version #3618
Comments
The replacements are not included in the a released version I believe. Are you trying to install a specific commit? |
No I was just doing
|
Ok so the problem is |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
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 |
/remove-lifecycle stale |
I think this is more relevant now that go 1.17 has deprecated installing executables with |
Hello @yhrn! any updates on this issue? |
@neha-viswanathan I just reported this, I'm not deeply involved with the development of Kustomize so I don't know how feasible this is to fix. |
@natasha41575 The exclude statements seem to just be artifacts from older release cycles. I dont see a point in excluding apis v2 when we are already on version v10 |
Version 4.5.2 is not affected by kubernetes-sigs/kustomize#3618.
Version 4.5.2 is not affected by kubernetes-sigs/kustomize#3618.
With #4387, I can now install |
reason: go: creating new go.mod: module tmp Downloading sigs.k8s.io/kustomize/kustomize/v4@v4.3.0 go: downloading sigs.k8s.io/kustomize/kustomize/v4 v4.3.0 go: sigs.k8s.io/kustomize/kustomize/v4@v4.3.0 (in sigs.k8s.io/kustomize/kustomize/v4@v4.3.0): The go.mod file for the module providing named packages contains one or more exclude directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module. make: *** [Makefile:36: kustomize] Error 1 the version bump seems to fix the issue as per kubernetes-sigs/kustomize#3618
reason: go: creating new go.mod: module tmp Downloading sigs.k8s.io/kustomize/kustomize/v4@v4.3.0 go: downloading sigs.k8s.io/kustomize/kustomize/v4 v4.3.0 go: sigs.k8s.io/kustomize/kustomize/v4@v4.3.0 (in sigs.k8s.io/kustomize/kustomize/v4@v4.3.0): The go.mod file for the module providing named packages contains one or more exclude directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module. make: *** [Makefile:36: kustomize] Error 1 the version bump seems to fix the issue as per kubernetes-sigs/kustomize#3618
Command 'go get' can no longer be used to build packages starting Go v1.18 (https://go.dev/doc/go-get-install-deprecation). Kustomize version also needs to be updated to v4.5 since go install doesn't support exclude directives (kubernetes-sigs/kustomize#3618). The change has been tested on both Go v1.17 and Go v1.18 to ensure the Makefile works properly.
Command 'go get' can no longer be used to build packages starting Go v1.18 (https://go.dev/doc/go-get-install-deprecation). Kustomize version also needs to be updated to v4.5 since go install doesn't support exclude directives (kubernetes-sigs/kustomize#3618). The change has been tested on both Go v1.17 and Go v1.18 to ensure the Makefile works properly.
The 3.8.x version constantly errors with go modules: go install sigs.k8s.io/kustomize/kustomize/v3@v3.8.7: sigs.k8s.io/kustomize/kustomize/v3@v3.8.7 The go.mod file for the module providing named packages contains one or more exclude directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module. See kubernetes-sigs/kustomize#3618 This is fixed in kubernetes-sigs/kustomize#4387 and kustomize v4.5.2 In the future, once we will switch to operator-sdk 1.22 there will be a separate script to install kustomize: https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh
The 3.8.x version constantly errors with go modules: go install sigs.k8s.io/kustomize/kustomize/v3@v3.8.7: sigs.k8s.io/kustomize/kustomize/v3@v3.8.7 The go.mod file for the module providing named packages contains one or more exclude directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module. See kubernetes-sigs/kustomize#3618 This is fixed in kubernetes-sigs/kustomize#4387 and kustomize v4.5.2 In the future, once we will switch to operator-sdk 1.22 there will be a separate script to install kustomize: https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh
Use 'go install' to install the executable. Note that it still calls 'go get' to update dependencies in go.mod. This stopped working in go1.18 because of https://go.dev/doc/go-get-install-deprecation. In making this change, kustomize broke and no longer installed. The problem is documented in kubernetes-sigs/kustomize#3618. The solution is to use at least v4.5.2. kustomize was upgraded to 4.5.7 from 3.8.8 and everything still worked.
* NETOBSERV-505 NOO fails to build with go1.18 and above Use 'go install' to install the executable. Note that it still calls 'go get' to update dependencies in go.mod. This stopped working in go1.18 because of https://go.dev/doc/go-get-install-deprecation. In making this change, kustomize broke and no longer installed. The problem is documented in kubernetes-sigs/kustomize#3618. The solution is to use at least v4.5.2. kustomize was upgraded to 4.5.7 from 3.8.8 and everything still worked. * Set GOFLAGS to ignore vendor directory. There is also no need to update dependencies since it is installing a specific version of an executable.
* go 1.17 has deprecated installing executables with `go get` Use go install instead Set GOFLAGS to empty string to overcome the `cannot query module due to -mod=vendor` error we get in presubmit job * Updated kustomize version to a version that support go install See kubernetes-sigs/kustomize#3618 * Install golangci-lint from source See golangci/golangci-lint#2374 * Fix lint issue See golangci/golangci-lint#2601 * Refactor - don't pass around origRes and origErr
Is your feature request related to a problem? Please describe.
Go 1.16 supports installing tools via
go install [package@version]
, which will build and install a specific version of that tool without interacting with the local go.mod. This does not work for Kustomize because its go.mod contains replace and exclude directives (more context here).It would be nice if this worked for Kustomize as well as that would allow us to handle all of our tool dependencies in a consistent and deterministic manner.
Describe the solution you'd like
I don't really have a suggestion for how to change the current module structure for this to work or if it is really feasible but I thought it might be worth bringing up at least.
The text was updated successfully, but these errors were encountered: