Continue reading "Monorepo Tooling Update: Signed Commit Support in Git 2.52"
Configuring Git Remotes: Fetch Only One Branch and No Tags
Continue reading "Configuring Git Remotes: Fetch Only One Branch and No Tags"
Resolving Git Commit History Divergence Due to Case-Sensitive Rename Operations
Continue reading "Resolving Git Commit History Divergence Due to Case-Sensitive Rename Operations"
Meson Pattern: Monorepo that Supports Individual Subproject Builds
Continue reading "Meson Pattern: Monorepo that Supports Individual Subproject Builds"
Building a Simplified CLI Using Invoke (for Monorepo Management)
Continue reading "Building a Simplified CLI Using Invoke (for Monorepo Management)"
Dealing With Duplicated Files in a Monorepo
Continue reading "Dealing With Duplicated Files in a Monorepo"
Does Everything Belong in a Monorepo?
Getting Rid of Old Code
Monorepo Development
This page collects articles, tools, and resources discussing our approach to internally developing code in a monorepo while distributing code to standalone repositories for consumption.
We are not monorepo advocates, and we will tolerate no arguments about what the “correct” approach is. We simply offer documentation and rationale for our current approach. How you organize your code is dependent on many factors that are unique to your own goals. There are reasons to keep your code in one place, and reasons to work with many distinct repositories. Additionally, we do not have a pure monorepo setup – there are a number of repositories that live completely outside of the monorepo environment.
Articles
- An Experiment: Develop in a Monorepo and Distribute to Standalone Repositories – outlines why we decided to create a monorepo, and why we will keep pushing changes to distributed repositories for consumption
- Dealing with Signed Commits When Creating and Splitting a Monorepo – outlines our efforts to find a solution for merging and splitting history with signed commits in play
- Getting Rid of Old Code – a highly recommended step, whether or not you are planning to move to a monorepo strategy
- Does Everything Belong in a Monorepo? – we call it a monorepo, but not all of our code is going in there. So what gets included, and what doesn’t?
- Dealing With Duplicated Files in a Monorepo
- Building an Invoke Interface for Monorepo Management
- Meson Pattern: Monorepo that Supports Individual Subproject Builds
- Dealing With Different Dependency Versions in a Monorepo
- Q&A: On Managing External Dependencies – discusses several strategies for managing external dependencies, and monorepos receive a mention
- Configuring Git Remotes: Fetch Only One Branch and No Tags – discusses how to reduce the cost of
fetchoperations when initializing a new repository - Monorepo Tooling Update: Signed Commit Support in Git 2.52 – documents our reversion to standard tools, as well as a
git-filter-repobehavior change that bit us unexpectedly
Infrastructure
- embeddedartistry/monorepo-tools – our improved implementation, which is based on
git filter-branch - shopsys/monorepo-tools – the original project, which is based on
git filter-branch
Alternatives
Tools exist that allow you to work with a set of repositories as if they were a monorepo, while actually keeping them separated. These might be more appealing to those facing similar problems.ls
- josh-project/josh is a related effort to ours. It is focused on supporting sparse-checkouts and implements a caching proxy.
- repo allows you to create a monorepo-like working environment by combining multiple repositories. It is similar in workflow to the monorepo-and-split workflow.
- We did not go down this path because it assumes you use Gerrit, and our automated workflows are tied into PRs. It will be easier to deal with our existing quality enforcement automation in a monorepo setup.
- Sourcegraph provides a tool that supports “batch changes”, allowing you to coordinate changes across repositories
- We did not choose this because we would need to set up a Sourcegraph server. Scripting the use of git tools within a monorepo was much easier for us to develop, test, and automate.
- Zephyr’s West uses the concept of workspaces and manifest files to allow you to work with multiple git repositories. You can define a manifest for your monorepo-to-be.
- This was simply not appealing to us.
Related Articles
References
- Advantages of monorepos by Dan Luu
Dealing with Signed Commits When Creating and Splitting a Monorepo
Continue reading "Dealing with Signed Commits When Creating and Splitting a Monorepo"
