ignore vendor directory #3033
ignore vendor directory #3033
Conversation
|
The last time we were discussing this was in #2266 - please have a read of that PR description as it provides some context. |
Now we have the official Go Modules.
When people use Dep, Glide or any other third party Package Management Tools, they don't use |
|
Thanks for the extra details @mmhyamin! That PR was from January 2017 and I figured a lot has changed since then. I'd also love input on this proposed change from recent contributors to this template: @tchajed @mxschmitt @bndw @AlekSi |
|
I would let the user choose if they want to include the vendor directory into her repository. There is not a single correct answer and it depends often on the project or use case itself. Maybe we can add it but comment it, so that the user can remove the comment if he wants and ignore the vendor directory. Note: afaik, go modules can and should be used without the "go mod vendor" command. So that's optional -> not in every repo is a vendor directory. |
They are still experimental. Even after Go 1.13, it would be years until most of the community moves to them.
+1. I don't understand why you want to have From #2266:
I still think this way. |
|
@mxschmitt I like the idea of commenting it out.
We don't use |
|
I spent considerable time trying to figure out what the
In addition, there are a lot of legacy tools which used a Personally I feel like ignoring the |
|
See https://golang.org/cmd/go/#hdr-Vendor_Directories and https://golang.org/s/go15vendor for
They are not legacy yet. First, support for Go modules in various static analysis and code generation tools is not trivial and quite painful ATM. Some tools support them already, most don't. Second, Go modules will be enabled by default only in Go 1.13 (to be released in August). Lastly, even after Go 1.13, many people will continue to use the
Then add |
|
@mxschmitt changed it according to your suggestion. |
Reasons for making this change:
go mod vendorcreates avendordirectory for dependency.Links to documentation supporting these rule changes:
https://github.com/golang/go/wiki/Modules