Skip to content

Commit

Permalink
Remove vendor directory.
Browse files Browse the repository at this point in the history
This was something previously brought up in tektoncd#1607, but was deferred to
allow for continued discussion.

Pros of making this change:
* Reduces size of incoming PRs when new dependencies are used.
* Removes confusion around source of truth for dependencies (e.g. vendor
vs mod). This was an issue that tektoncd#1763 solved by pinning to vendor, this
will solve the same problem differently by always deferring to the
version in go.mod.
* Allows easier use of upstream and dependent types without the use of
vendor - see
https://gist.github.com/wlynch/325293bc3fbc488d3b3d319f3a93bbea for an
example of why this is difficult today.

Risks of making this change:
* Dependencies will not be present in initial clone. They will be
fetched dynamicly when needed, which may cause workflow distruptions.
* This breaks compatibility with older versions of Go (though for
certain projects like triggers, we already require Go >= 1.13).

Third-party obligations (for things like making source available in
images) have already been addressed in tektoncd#1607.

As with tektoncd#1607, this change is more easily viewed by running `git diff
master -- ':!third_party' ':!vendor'`
  • Loading branch information
wlynch committed Dec 26, 2019
1 parent 5a9e8ba commit 93bf39b
Show file tree
Hide file tree
Showing 3,884 changed files with 5 additions and 1,148,043 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/library.sh
source $(go list -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/library.sh

# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
Expand Down
6 changes: 1 addition & 5 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/library.sh
source $(go list -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/library.sh

cd ${REPO_ROOT_DIR}

# Prune modules.
go mod tidy
go mod vendor

update_licenses third_party/
2 changes: 1 addition & 1 deletion hack/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/library.sh
source $(go list -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/library.sh

readonly TMP_DIFFROOT="$(mktemp -d ${REPO_ROOT_DIR}/tmpdiffroot.XXXXXX)"

Expand Down
3 changes: 1 addition & 2 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

# Helper functions for E2E tests.

go get -d github.com/tektoncd/plumbing
source $(go list -m -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/e2e-tests.sh
source $(go list -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/e2e-tests.sh

function teardown() {
subheader "Tearing down Tekton Pipelines"
Expand Down
3 changes: 1 addition & 2 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
export DISABLE_MD_LINTING=1
export DISABLE_MD_LINK_CHECK=1

go get -d github.com/tektoncd/plumbing
source $(go list -m -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/presubmit-tests.sh
source $(go list -f '{{.Dir}}' github.com/tektoncd/plumbing)/scripts/presubmit-tests.sh

function post_build_tests() {
header "running golangci-lint"
Expand Down
Loading

0 comments on commit 93bf39b

Please sign in to comment.