An alternative to use dependency management tools like dep would be to use Git - Submodules to checkout the dependent repos into the vendor directory. There has even been some 3rd party tools that attempted to solve the dependency problem using git submodules.
Given there are some advantages to using git submodules to vendor dependencies, wondering if there has been any discussion or consideration towards supporting git submodules in dep as an option to vendor dependencies ?
hi, welcome! thanks for the question - this is probably one we should put into the FAQ, it's come up a number of times.
No, git submodules are not going to be a part of dep, beyond the one tiny bit of support we have now (we preserve /vendor/.git, if it exists - cockroachdb uses this technique to keep vendor from bloating their primary repo size). Here's the pro/con list on it:
Pros
Cons
vendor is dead code, and directly modifying anything in there is an error.Thank you @sdboyer for the detailed pros/cons.
And thanks for adding it to the FAQ 馃挴
Thanks, I was also wondering this and the detailed explanation gave me a good ponder. Thanks @sdboyer!
Most helpful comment
hi, welcome! thanks for the question - this is probably one we should put into the FAQ, it's come up a number of times.
No, git submodules are not going to be a part of dep, beyond the one tiny bit of support we have now (we preserve
/vendor/.git, if it exists - cockroachdb uses this technique to keepvendorfrom bloating their primary repo size). Here's the pro/con list on it:Pros
Cons
vendoris dead code, and directly modifying anything in there is an error.