News for hackers. Stuff that matters.
Re:Microsoft and GitHub team up to take Git virtual file sys... by Sevii on Friday November 17, 2017 @01:57PM (#15724910)
Got vfs is more motivated by Microsoft wanting to use git as a monorepo. I think they have around 2k windows devs on one git tree with this vfs.
Re:Microsoft and GitHub team up to take Git virtual file sys... by philipov on Friday November 17, 2017 @02:03PM (#15724961)
Are there advantages to using a monorepo rather than having a proper package manager? Seems like the problems they're trying to solve would be better solved by not insisting on using a monorepo.
Re:Microsoft and GitHub team up to take Git virtual file sys... by AaronFriel on Friday November 17, 2017 @02:19PM (#15725114)
While this debate keeps being hashed out, it's important to note that some of the largest and most successful tech companies have decided to use monorepos. Facebook, Google, Microsoft, and others use monorepos.

I suspect one factor for Microsoft is that many patches will be cross-cutting, and tooling with multiple repositories or even submodules remains poor.

Re:Microsoft and GitHub team up to take Git virtual file sys... by philipov on Friday November 17, 2017 @02:49PM (#15725410)
I think it's dangerous to assume a causal link between success and their use of monorepos. As aaronAgain points out, Microsoft's codebase existed since before monoliths were recognised to be a bad idea. They're already screwed, and need a solution for where they are today. That's a valid and important use-case, but doesn't suggest that someone starting from scratch should follow their lead.
Re:Microsoft and GitHub team up to take Git virtual file sys... by aaronAgain on Friday November 17, 2017 @02:24PM (#15725171)
It will take years to break apart some of the code into packages. In the meantime Git has to work on the monolith, so why not contribute back how we did that.

Disclosure: Work at MS

Re:Microsoft and GitHub team up to take Git virtual file sys... by philipov on Friday November 17, 2017 @02:43PM (#15725352)
If that's the reason, that's a great use-case for it. I am looking at it from a green fields perspective, and it seems more profitable to start with my company's codebase split up into packages from the outset, and focus on building tooling to handle package dependency version management instead of building tools to handle monorepos. The existence of large companies using monorepos creates some cargo cult pressure on those trying to make a decision which path to take, and so I think it's important to discuss what is really the goal to determine the best fit for my own use-case.
Re:Microsoft and GitHub team up to take Git virtual file sys... by jcrawfordor on Friday November 17, 2017 @04:11PM (#15725985)
For what it's worth, I work on a project that is split into multiple repos that we now wish was a monorepo. Internal versioning issues are complex and end up eating a lot of time in our CI/CD workflow when they deliver no actual value to the end customer, since it all ships as one discrete unit. Ultimately we have a couple of FTEs that are basically hand-picking commits out of different repos to try to assemble a complete system of all versions that integrate with eachother. If we were working in one repo and kept breaking interface changes in feature branches this work would be significantly reduced, and the improved visibility of those cross-cutting changes would probably also motivate a faster turnaround time on them.

I would think that versioning and compatibility issues are the main driver of monorepos - if you are ultimately shipping one product, why get wrapped up in all the labor that can be involved in breaking it down while still being able to pull off working versions to test? Might be a much better decision to just treat it as one giant repo that always stays in a working state.

And finally, as a more soft-factors issue, I think that a monorepo can help to reduce siloization. We sometimes have issues with teams not liking it when people mess with "their" repo, which slows down cross-cutting changes by a huge factor. A monorepo would probably be a powerful factor against this kind of thing.

Re:Microsoft and GitHub team up to take Git virtual file sys... by philipov on Friday November 17, 2017 @04:18PM (#15726041)
These are good observations. What about if you're explicitly not shipping all the code to each client, but have individual projects per client? Some of these criticisms still apply, but it seems more natural to have a repository per client/project when you're building bespoke solutions, or customizations from an inventory of shrink-wrapped solutions. [And clients must only see their own code.]

If the problem is the usability of multiple repositories, could this be solved with better tooling? Projects like GVFS suggest that monorepos do not avoid a need for strong tooling.

Re:Microsoft and GitHub team up to take Git virtual file sys... by WorldMaker on Friday November 17, 2017 @04:04PM (#15725938)
It's a cultural question like tabs versus spaces as much as anything: there are tools to support both, developers with plenty of opinions on both sides, many of which vary from language to language/environment to environment. Some languages have great package dependency systems, other languages excel when more of the code is more directly accessible.

It's easier for junior developers to deal with monorepos and it takes certain architecture considerations to plan for a strong component model and version management of that. Would you expect to have the right mix of senior-level staff to junior-level staff to handle that? What sort of turnover might you expect?

Furthermore, many monorepos sometimes don't happen intentionally, they just grow organically. It's sometimes only in hindsight where you realize that what you thought of as one system, one component, could have been cut into smaller pieces. It's sometimes only in hindsight where you realize that something you thought of as an internal-only API you didn't wish to version and package and support as such should have been componentized and versioned and packaged separately.

On both sides of the monorepo/small-packages spectrum there are continual trade-offs of time versus planning versus skill level, and neither is necessarily the "right" answer, and likely what you end up doing is somewhere in the middle, some combination of both, based as much on pragmatic needs as anything else.

Re:Microsoft and GitHub team up to take Git virtual file sys... by asmosoinio on Friday November 17, 2017 @03:16PM (#15725624)
When you say "start your company", I assume a small total repo size. I would say definitely go for a single repo, every time, all the time. Internal version dependencies can be surprisingly hard to handle even with a handful of components/apps.

It is extremely unlikely that your companys code size would become too much to handle in a single repo. And before that, imho it's just premature optimization to split things up.

Re:Microsoft and GitHub team up to take Git virtual file sys... by philipov on Friday November 17, 2017 @04:04PM (#15725935)
While it's possible for it to become premature optimization, there is a level of division that hits a sweet spot that should absolutely be done up-front. I think it is not unreasonable to have a repository per project, and have another "Core" repository for code you factor out of individual project repos for reuse. As the core becomes more complex, you are then already set up to handle it.

Likewise, if you don't write at least some documentation up-front, you're much more likely to never get it done at all.

Re:Microsoft and GitHub team up to take Git virtual file sys... by asmosoinio on Friday November 17, 2017 @04:20PM (#15726057)
Based on my experiences, I would disagree. The "core" becomes a mess of versions and dependencies - you still need ALL the other repos to be able to change the code/data there to check all dependencies.

Just split with folders within the repo.

Anyways this is my opinion, and I know many wise people that disagree with me. And I've seen companies work well with both multiple and single repo.

I.e. your mileage may vary.

Re:Microsoft and GitHub team up to take Git virtual file sys... by wildmusings on Friday November 17, 2017 @02:28PM (#15725210)
If you separate things out, you have to now manage version compatibility among different components. Which is a massive waste of time when they are going to be shipped as a single unit anyway. Things are indeed being broken up into packages, but they still all live in the same repository.

Microsoft goes one step further and checks the entire build system into the source tree too, compiler and all.

The effect of all this is that you can sync to any known-good version of Windows and just build it without worrying about other dependencies.

Re:Microsoft and GitHub team up to take Git virtual file sys... by InclinedPlane on Saturday November 18, 2017 @02:12AM (#15728107)
I've worked at both Microsoft and Amazon, and they have opposite strategies for integrating large code bases. Microsoft prefers putting everything into one giant project and having different teams touch different parts of it (there are lots of advantages in this, incidentally, especially in terms of servicing). Amazon goes the opposite way, by essentially using package management to keep track of and manage dependencies between a huge number of smaller projects. Amazon's solution works well for them, partly because it matches their service oriented architecture. But at the same time, it's the only thing of its sort I've ever seen that was actually built to a sufficient level of quality. And it represents a tremendous investment of dev work over a more than a decade.

Microsoft is capable of doing that kind of work (and they sort of are with some of the azure stuff they're working on) but it's a non-trivial project that requires a tremendous amount of investment of time and resources. And that's just to get to square one, let alone something that is competitive with their other infrastructure (keep in mind that microsoft also has tremendous investments in build and CI infrastructure). That's a very hard sell, especially from a risk management perspective.

Re:Microsoft and GitHub team up to take Git virtual file sys... by int_19h on Saturday November 18, 2017 @10:42AM (#15729369)
In Microsoft, it really depends on which org you're in, and which product you're working on. Older codebases (Windows, Office) tend to be monorepos. Newer ones are generally less so. And some of the older ones have been migrating slowly via componentization (VS).