amazon-apigateway-ingress-controller icon indicating copy to clipboard operation
amazon-apigateway-ingress-controller copied to clipboard

make docker-build fails due to vendor/

Open alph486 opened this issue 5 years ago • 1 comments

When running make docker-build, assuming one does not go get the dependencies separately, the command fails with something similar to:

pkg/cloudformation/cloudformation.go:10:2: cannot find package "github.com/awslabs/goformation/cloudformation/resources" in any of:
	/usr/local/opt/go/libexec/src/github.com/awslabs/goformation/cloudformation/resources (from $GOROOT)
	/Users//golang/src/github.com/awslabs/goformation/cloudformation/resources (from $GOPATH)
	/Users//golang/src/github.com/awslabs/goformation/cloudformation/resources
	/Users//Development/amazon-apigateway-ingress-controller/src/github.com/awslabs/goformation/cloudformation/resources
	/Users//Development/amazon-apigateway-ingress-controller/vendor/src/github.com/awslabs/goformation/cloudformation/resources
../../golang/src/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go:20:2: cannot find package "gomodules.xyz/jsonpatch/v2" in any of:
	/usr/local/opt/go/libexec/src/gomodules.xyz/jsonpatch/v2 (from $GOROOT)
	/Users//golang/src/gomodules.xyz/jsonpatch/v2 (from $GOPATH)
	/Users//golang/src/gomodules.xyz/jsonpatch/v2
	/Users//Development/amazon-apigateway-ingress-controller/src/gomodules.xyz/jsonpatch/v2
	/Users//Development/amazon-apigateway-ingress-controller/vendor/src/gomodules.xyz/jsonpatch/v2
make: *** [vet] Error 1

From what I can tell this is because vendor/ is now ignored in golang v1.11+ https://github.com/golang/go/wiki/GOPATH#use-a-single-gopath . It sounds like we need to adapt either the documentation or the automation to accommodate this.

alph486 avatar May 13 '20 17:05 alph486

I'm running into this, and it appears that "github.com/awslabs/goformation/cloudformation/resources" doesn't exist unless you go way back to v2.3.1 of goformation.

bentlema avatar Jul 16 '20 19:07 bentlema