tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.55k stars 455 forks source link

Question about commit the vendor directory #547

Closed iblancasa closed 6 years ago

iblancasa commented 6 years ago

I read this in the documentation:

Read over the contents of vendor/ and make sure it looks reasonable. Then commit the Godeps/ and vendor/ directories to version control.

Why it is a good practice to commit the vendor directory? Usually this is something bad in other languages.

I didn't found information about this topic.

Thank you for your time.

Ortham commented 6 years ago

I'm wondering this too, since godep restore and godep get seem to have no problem downloading and installing the dependencies specified in Godeps.json. If we don't need offline builds, do we really need to commit the vendor/ folder? Is something going to blow up in my face if I don't?

The FAQ gives the reasoning why the godep authors think vendor/ should be checked in, but some clarity that this is (seems to be?) merely an opinion and not a technical requirement would go a long way. For example, the readme currently has

Then commit the Godeps/ and vendor/ directories to version control.

Is the following alternative valid?

Then commit the Godeps/ directory to version control. The godep authors also recommend committing the vendor/ directory to allow offline builds and reduce reliance on the availability of external systems.

freeformz commented 6 years ago

I am closing this issue because the repo is going to be archived.