ethereumproject / go-ethereum

Go language implementation of the original/classic design of the Ethereum protocol
GNU Lesser General Public License v3.0
441 stars 166 forks source link

Update gitignore file to ignore `vendor` folder changes #687

Closed r8d8 closed 5 years ago

whilei commented 5 years ago

This is a controversial issue; whether or not to add vendor files to VC. Here's a discussion for example: https://www.reddit.com/r/golang/comments/8s1cjd/do_i_gitignore_the_vendor_folder_dep/

whilei commented 5 years ago

I guess personally I think I prefer to keep vendor in VC for always reproducible builds and simplified build steps (no need to give instructions for dep ensure).

If the pain for your PR is because it's based on commits prior to some vendor changes, have you tried

$ rm -rf ./vendor ./Gopkg* # nuke some vendoring things if you're feeling aggressive ;) but not necessary
$ git checkout master -- vendor Gopkg*
$ git clean -fd
$ git add . && git commit -m "Fake rebase vendor dir to master"
r8d8 commented 5 years ago

Yeap, I can avoid vendor with removing it before commit. But as we using dep ensure in our Makefile, I thought it would be more transparent just to store project sources in git and download dependency during builds.

tzdybal commented 5 years ago

In my opinion we shouldn't add vendor to .gitignore. It's a 'traditional', pre-dep, dependency-tool agnostic way of vendoring dependencies in Go.

whilei commented 5 years ago

Marking as resolved now for the time being - we’ll leave vendor as-is.