News for hackers. Stuff that matters.
Re:Why Google Stores Billions of Lines of Code in a Single R... by justicezyx on Wednesday July 25, 2018 @04:21AM (#17607682)
Single repo is one design that coherently addresses source control management and dependency management.

The key is to let the repo be a single comprehensive source of data for building arbitrary artifacts.

Re:Why Google Stores Billions of Lines of Code in a Single R... by MaxBarraclough on Wednesday July 25, 2018 @05:03AM (#17607853)
> The key is to let the repo be a single comprehensive source of data for building arbitrary artifacts.

By that do you mean it's one way of doing it, or that it's the only way?

Seems clear to me that it's not the only way. For instance .Net code tends to be Git for the project source + NuGet for external dependencies. It works pretty well.

Re:Why Google Stores Billions of Lines of Code in a Single R... by justicezyx on Wednesday July 25, 2018 @06:15AM (#17608143)
It's one way. There isnt any problem that can only be solved in one way.
Re:Why Google Stores Billions of Lines of Code in a Single R... by evfanknitram on Wednesday July 25, 2018 @04:43AM (#17607785)
I don't know what this means.

How is "single repo" a "design" and how does this design dictate dependency management?

Yes, if you have a single repo then that would be a single source of data for building your stuff. That seems redundant.

Re:Why Google Stores Billions of Lines of Code in a Single R... by justicezyx on Wednesday July 25, 2018 @05:43AM (#17608032)
See Bazel, you have the depes manifested as source controlled the data, then you can build everything as deterministically as possible.

Then you can manage dependency as part of the normal source control process.

Re:Why Google Stores Billions of Lines of Code in a Single R... by adrianN on Wednesday July 25, 2018 @08:32AM (#17608725)
A single repo makes it a bit tricky to use some library in version A for project X and version B for project Y.
Re:Why Google Stores Billions of Lines of Code in a Single R... by paulddraper on Wednesday July 25, 2018 @09:13AM (#17608955)
Correct.

You can consider that a bad thing or a good thing.

Most language's package composition (C/C++, Java, Python, Ruby) don't permit running multiple versions at runtime. The single-version policy is one way of addressing dependency hell.

Re:Why Google Stores Billions of Lines of Code in a Single R... by bunderbunder on Wednesday July 25, 2018 @10:14AM (#17609370)
I think that's actually a good thing. Allowing different projects to use different versions of a 3rd-party package may be convenient for developers in the short term, but it creates bigger problems in the long term.
Re:Why Google Stores Billions of Lines of Code in a Single R... by adrianN on Wednesday July 25, 2018 @10:45AM (#17609634)
It depends on the industry. In some places changing a dependency, no matter how trivial the change, entails a lot of work. Think for example about embedded systems where deploying is a lot harder than pushing a Docker image somewhere. It is often far cheaper to analyze whether the fixed bug can be triggered to avoid upgrading unless necessary.
Re:Why Google Stores Billions of Lines of Code in a Single R... by bunderbunder on Wednesday July 25, 2018 @11:26AM (#17609984)
In those situations, why not go ahead and keep the code up-to-date and consistent, and simply not deploy when you don't need to?
Re:Why Google Stores Billions of Lines of Code in a Single R... by adrianN on Thursday July 26, 2018 @12:44AM (#17615108)
Because that costs money now that could be spent on something that actually produces a profit.
Re:Why Google Stores Billions of Lines of Code in a Single R... by Nihilartikel on Thursday July 26, 2018 @08:12AM (#17616789)
If I recall, in Google's build system, a dependency in the source tree can be referenced at a commit ID, so you can actually have a dependency on an earlier version of artifacts in source control.
Re:Why Google Stores Billions of Lines of Code in a Single R... by justicezyx on Saturday July 28, 2018 @05:06PM (#17635051)
No, that's not true since at least 2013 (the year I joined Google).