Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: Revert "Add vendor folder to Go.gitignore" #2183

Closed
wants to merge 1 commit into from

Conversation

@zchee
Copy link

@zchee zchee commented Nov 12, 2016

This reverts commit 14740a5.

Reasons for making this change:

Any Go developers sometimes static vendoring into vendor directory.
Because for the delete vendoring packages repository, reliably build with
vendor packages or etc.
Also, A typical vendoring tool such as gb, gvt will create manifest file on vendor directory.

In Go language development, ignoring vendor directory is should be
left to the package authors.(I think)

Links to documentation supporting these rule changes:

https://github.com/derekparker/delve/tree/master/vendor
https://github.com/zchee/docker-machine-driver-xhyve/tree/master/vendor

This reverts commit 14740a5.

Any Go developers sometimes static vendoring into vendor directory.
Because for the delete vendored repository, reliably build with
vendor packages or etc.
In Go language development, ignoring vendor directory is should be
left to the package authors.

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@zchee
Copy link
Author

@zchee zchee commented Nov 12, 2016

/cc @futabooo

@zchee zchee changed the title Revert "Add vendor folder to Go.gitignore" Go: Revert "Add vendor folder to Go.gitignore" Nov 12, 2016
@futabooo
Copy link
Contributor

@futabooo futabooo commented Nov 12, 2016

you have got a point.
It may be better to leave it to developers.

below is my opinion.

Any Go developers sometimes static vendoring into vendor directory.
Because for the delete vendoring packages repository, reliably build with
vendor packages or etc

I think it is not good,It is better to use package management

Also, A typical vendoring tool such as gb, gvt will create manifest file on vendor directory.

how about this?

/vendor
!/vendor/manifest
@zchee
Copy link
Author

@zchee zchee commented Nov 12, 2016

@futabooo

I think it is not good,It is better to use package management
how about this?
/vendor
!/vendor/manifest

Yeah, That is our gopher's ideal. like ruby's gem or any good package manager.
However, Go vendoring manager tools is not stable yet. Still chaotic(?).

Also, If package manager supports the good vendoring feature, still have depends on the existence of the github repository.
I do not know the thought of other developers, but I guess that is probably concerned about the occurrence of "npm leftpad"(at least I am).
Therefore, I did statically vendoring. In other words, including all vendor packages .go file to my repository's vendor directory.

Well, I always delete it and create a .gitignore, so there is no problem. If you do not like it, I will close it :)
However, it certainly has a .go file in the vendor that docker, docker-machine, minikube.

@futabooo
Copy link
Contributor

@futabooo futabooo commented Nov 12, 2016

@zchee
Overall agreement:)
I'd like to ask other people's thoughts, so I do not think you need to close it!

@nickng
Copy link

@nickng nickng commented Nov 15, 2016

Vendoring support is officially supported as of go1.6, which means the vendor directory is recognised by Go project's go build or go install command to build Go code.

There are a number of projects, including widely used projects like docker, which uses the vendor directory. Putting vendor on GitHub's .gitignore will not affect most existing users or those who write their own .gitignore, but Go users who create .gitignore using GitHub's web interface may be confused by the discrepancies between the official specifications and the behaviour of the default .gitignore created by GitHub.

I don't believe this is a matter of personal choice, but should be considered for the consistency between Go project's specification/official tooling support and the expectation of a conservative, default .gitignore. Hence I will strongly support leaving vendor out of .gitignore (i.e. please proceed with the revert).

@shiftkey
Copy link
Member

@shiftkey shiftkey commented Jan 28, 2017

Closing due to conflicts. @zchee please have a look at the latest file and see if anything needs to be incorporated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants