Remove vendor/ (#688)

Vendoring seems to be problematic with go modules.
In addition to causing issues with transitive dependencies and being
problematic when trying to pull in the node-cli code, it also seems to
be pulling different versions than what is computed in go.mod.
This can be seen by comparing commits from the computed version in
go.mod with very small diffs (like a single Godep change in k8s) but massive
vendoring changes.

Basically I have very little confidence that this is even working.
This should be better in go1.13, but this is not released yet.
This commit is contained in:
Brian Goff
2019-07-02 10:04:40 -07:00
committed by Pires
parent b915cde1ae
commit 3840bc2666
2391 changed files with 14 additions and 780572 deletions

View File

@@ -38,7 +38,7 @@ build: build_tags := netgo osusergo
build: OUTPUT_DIR ?= bin
build: authors
@echo "Building..."
$Q CGO_ENABLED=0 go build -mod=vendor -ldflags '-extldflags "-static"' -o $(OUTPUT_DIR)/$(binary) $(if $V,-v) $(VERSION_FLAGS) ./cmd/$(binary)
$Q CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o $(OUTPUT_DIR)/$(binary) $(if $V,-v) $(VERSION_FLAGS) ./cmd/$(binary)
.PHONY: tags
tags:
@@ -51,13 +51,7 @@ release: build goreleaser
##### =====> Utility targets <===== #####
.PHONY: clean test list cover format docker vendor
vendor:
@echo "Ensuring Dependencies..."
$Q go env
$Q go mod vendor
.PHONY: clean test list cover format docker
mod:
@echo "Prune Dependencies..."
$Q go mod tidy
@@ -85,11 +79,11 @@ endif
test:
ifndef CI
@echo "Testing..."
$Q go test -mod=vendor $(if $V,-v) $(allpackages)
$Q go test $(if $V,-v) $(allpackages)
else
@echo "Testing in CI..."
$Q mkdir -p test
$Q ( GODEBUG=cgocheck=2 go test -mod=vendor -v $(allpackages); echo $$? ) | \
$Q ( GODEBUG=cgocheck=2 go test -v $(allpackages); echo $$? ) | \
tee test/output.txt | sed '$$ d'; exit $$(tail -1 test/output.txt)
endif
@@ -103,7 +97,7 @@ cover: gocovmerge
$Q rm -f .GOPATH/cover/*.out cover/all.merged
$(if $V,@echo "-- go test -coverpkg=./... -coverprofile=cover/... ./...")
@for MOD in $(allpackages); do \
go test -mod=vendor -coverpkg=`echo $(allpackages)|tr " " ","` \
go test -coverpkg=`echo $(allpackages)|tr " " ","` \
-coverprofile=cover/unit-`echo $$MOD|tr "/" "_"`.out \
$$MOD 2>&1 | grep -v "no packages being tested depend on"; \
done