From what I gather “one giant Perforce repository with all code used in the company” is a surprisingly common version-control model at large companies.
We do that at my company (on a much smaller scale than Google) and I there are a lot of benefits. All our services and shared library code is in the same repo. It means every commit to the repo leaves every service fully in sync with one another for interface and data versions - no dependency management needed. It also makes git bisect awesome for bug tracking since all our code builds reliabily at every commit you bisect to.
Also it implies shared code ownership which I like. Anyone can fix anything and run all the tests for all the services at once and know nothing is broken.
Agree. Not sure why the title doesn’t use at least scare quotes for “solution”:
Basically they are saying “We put every single piece of code we need into a global repository, and pretty much don’t care about anyone not doing this. Let’s just standardize some of the dirty hacks and workarounds seen in the wild so that we can keep not caring about it.”
It scares the hell out of me when I imagine inexperienced people learning Go and thinking that this is the best way to manage dependencies in 2015.
We put every single piece of code we need into a global repository, and pretty much don’t care about anyone not doing this.
They are not alone in doing this, contrary to what you wrote. Facebook does it too, with very much success.
Let’s just standardize some of the dirty hacks and workarounds seen in the wild so that we can keep not caring about it.
I don’t think this is a hack. I’d even go as far as saying that the hack is dependency management tools like Python’s pip, Ruby’s Bundler and Node’s npm. I’ve been used these tools for a long time, and unlike you, I was not convinced. Vendoring in a monolithic company-wide repository seems to me a very reasonable and efficient approach.
So what? They can do whatever they want. That’s not the issue.
… contrary to what you wrote.
Where did I write that?
Python’s pip, Ruby’s Bundler and Node’s npm. I’ve been used these tools for a long time, and unlike you, I was not convinced.
You are basically saying that some of the worst dependency management tools ever invented are even worse than not doing any kind of dependency management?
I don’t think many people would disagree with that.
So what? They can do whatever they want. That’s not the issue.
I was replying to the part of your comment where you write “and [they] pretty much don’t care about anyone not doing this”. But you’re right in saying their choice is probably independent of what other companies do.
Where did I write that?
My mistake. I misread your comment. Sorry for that.
You are basically saying that some of the worst dependency management tools ever invented are even worse than not doing any kind of dependency management? I don’t think many people would disagree with that.
What dependency management tools would you recommend as good examples?
This is a terrible idea (as others have noted). Vendoring is a workaround for the current lack of Go tooling for dependency management, it is not the solution to it.
Of course, I disagree with vendoring being a hack. Would you seriously argue that the entire Google and Facebook codebase is founded on a hack? That said, I’d be curious to know why it is hack according to you.
I’m fine with vendoring.. but a real headache with this approach is the import path rewriting. Nothing is scarier than adding source code to your repo, trying to check if it has been modified and seeing a huge diff. I’m curious why they wouldn’t go the multiple GOPATH direction, as it at least leaves vendored code unmodified until the go tool is drastically improved.
Exactly. That’s how the C/C++/Rust/npm/whatehaveyou projects I’ve worked on have done. Unfortunately the go tool enforces this GOPATH nonsense that has mostly ruined any chances of getting reasonable vendoring.
It is interesting that they consider the dependencies of a library to almost be a non-issue (so far at least…the conversation is obviously ongoing).
I was also somewhat surprised to read that they have all their Go code in a single giant internal repo. That seems awful to me for some reason.
[Comment removed by author]
[Comment removed by author]
[Comment removed by author]
From what I gather “one giant Perforce repository with all code used in the company” is a surprisingly common version-control model at large companies.
[Comment removed by author]
And Facebook too. They rely on a single company-wide Mercurial repository.
We do that at my company (on a much smaller scale than Google) and I there are a lot of benefits. All our services and shared library code is in the same repo. It means every commit to the repo leaves every service fully in sync with one another for interface and data versions - no dependency management needed. It also makes git bisect awesome for bug tracking since all our code builds reliabily at every commit you bisect to.
Also it implies shared code ownership which I like. Anyone can fix anything and run all the tests for all the services at once and know nothing is broken.
Agree. Not sure why the title doesn’t use at least scare quotes for “solution”:
Basically they are saying “We put every single piece of code we need into a global repository, and pretty much don’t care about anyone not doing this. Let’s just standardize some of the dirty hacks and workarounds seen in the wild so that we can keep not caring about it.”
It scares the hell out of me when I imagine inexperienced people learning Go and thinking that this is the best way to manage dependencies in 2015.
They are not alone in doing this, contrary to what you wrote. Facebook does it too, with very much success.
I don’t think this is a hack. I’d even go as far as saying that the hack is dependency management tools like Python’s pip, Ruby’s Bundler and Node’s npm. I’ve been used these tools for a long time, and unlike you, I was not convinced. Vendoring in a monolithic company-wide repository seems to me a very reasonable and efficient approach.
So what? They can do whatever they want. That’s not the issue.
Where did I write that?
You are basically saying that some of the worst dependency management tools ever invented are even worse than not doing any kind of dependency management?
I don’t think many people would disagree with that.
I was replying to the part of your comment where you write “and [they] pretty much don’t care about anyone not doing this”. But you’re right in saying their choice is probably independent of what other companies do.
My mistake. I misread your comment. Sorry for that.
What dependency management tools would you recommend as good examples?
It’s not their Go code, Google keep all their code in a single epic repository.
This is a terrible idea (as others have noted). Vendoring is a workaround for the current lack of Go tooling for dependency management, it is not the solution to it.
Nah. Vendoring is a totally reasonable, maybe the best solution to the problem of dependency management. The devil’s in the details, of course.
Of course, I disagree with vendoring being a hack. Would you seriously argue that the entire Google and Facebook codebase is founded on a hack? That said, I’d be curious to know why it is hack according to you.
Facebook was written in PHP. That’s pretty much the definition of a hack.
I’m fine with vendoring.. but a real headache with this approach is the import path rewriting. Nothing is scarier than adding source code to your repo, trying to check if it has been modified and seeing a huge diff. I’m curious why they wouldn’t go the multiple GOPATH direction, as it at least leaves vendored code unmodified until the go tool is drastically improved.
I agree. Vendoring is great, but import path rewriting can be scary. Ideally, I’d prefer vendoring without any import path rewriting.
Exactly. That’s how the C/C++/Rust/npm/whatehaveyou projects I’ve worked on have done. Unfortunately the go tool enforces this GOPATH nonsense that has mostly ruined any chances of getting reasonable vendoring.