Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This work is a proposal. In another pull request, I had more than 1K files modified just by changing a dependency version.
I took sight it might also be a good way to introduce an undesired/unhandled/malicious modification in vendor files as currently travis does not check consistency between
vendor
directory andgo.mod
file.In this change I did the following things
vendor
directory.travis/go-cache
directory: to create this, I cleaned my own cache directory (go clean --modcache
), deleted thevendor
directory, and did ago mod vendor
. Then I created the.travis/go-cache
directory from$GOPATH/pkg/mod
directory.travis.yml
,integration-test.sh
to copy cache to$GOPATH/pkg/mod
before running ago mod vendor
DEVELOPMEND.md
file to tell any neww developer to run ago mod vendor
after cloning repository.hack/boilerplate.sh
andhack/gofmt.sh
to ignore the.travis
directoryvendor
directory to the.gitignore
fileI cut my laptop from network and made a
cp -r ./.travis/go-cache $GOPATH/pkg/mod && go mod vendor && make out/executor
and it worked perfectly.This way, it may be a good thing to let the core team be the protector of the
.travis/go-cache
directory (pull requests will download new dependencies in their jobs but cache will be updated by core team once it is merged).What do you think of it @cvgw @tejal29 ?
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes