Resolving Git Commit History Divergence Due to Case-Sensitive Rename Operations

This post is mostly a note-to-self, because I've solved this before but have no notes on it. I also hope that publishing it on my website might save someone a few minutes or hours in the future. Short Summary If your commit history has case-sensitive rename operations and you're mucking around with history, you may …

Meson Pattern: Monorepo that Supports Individual Subproject Builds

As mentioned in the article, Develop in a Monorepo and Distribute to Standalone Repositories Develop in a Monorepo and Distribute to Standalone Repositories, we've merged many of our repos into a monorepo setup, but we're going to continue to distribute changes to the existing standalone repositories. To support this model, we have the following requirements …

Building a Simplified CLI Using Invoke (for Monorepo Management)

Our monorepo work has involved creating several helper scripts to handle repeated complex operations. This is essential, but let me tell you, it's annoying to always be in the monorepo root and to invoke these scripts by the full path. I'm a huge fan of creating simplified CLI interfaces to make work easier. My usual …

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.

Warning

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

Infrastructure

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.

References

Dealing with Signed Commits When Creating and Splitting a Monorepo

A major roadblock on the way to the goal of developing in a monorepo and distributing to standalone repositories arose with signed commits. This article logs the problems I faced, options for addressing the issue, and my thoughts on the matter. This is still an open investigation, and I am logging my ideas and results. …