News for hackers. Stuff that matters.
Re:What I learned in 2017 writing Go by m90 on Thursday January 04, 2018 @02:07AM (#16068567)
Do you have production applications running that do exclude their vendor folder? Does this work reliably? How do you handle dependencies that do not use semver?

What would be one of the cases where you'd say you need to commit vendor?

Re:What I learned in 2017 writing Go by JelteF on Thursday January 04, 2018 @02:24AM (#16068619)
All our production applications don't have their vendor committed. By running "dep ensure" it dep restores the exact same vendor directory from the lock file, we do this in CI where we build our binaries. For dependencies that don't support semver dep uses the master branch by default and pins a commit to support reproducible builds. The only case where this has caused problems for us was when one of our dependencies force pushed to master, so the commit that was pinned didn't exist anymore. This resulted in a failing build though, not an inconsistent one.

Other than working around that issue the only case where you actually need to commit vendor (at the moment) is when you want your project to compile reproducibly by only running "go get project". If you are fine with telling your user to run "dep ensure" (or make) first this is not needed. This is not usually an issue when working with colleagues, but can be nice for publicly released projects.

Re:What I learned in 2017 writing Go by m90 on Thursday January 04, 2018 @10:29AM (#16071007)
Thanks for all the insights! I will give this a go soon I guess.