Currently we have 104 branches open in the monorepo:
main
- 44 release branches
- 8
revert
branches - 41 user branches from 8 users who use SPR
- 10 user branches from 6 users that apparently don’t use SPR [1]
I find the rate of people who create user branches but don’t use SPR alarming, and would like to bring attention to this fact. I’m also wondering what are those 8 revert branches are, and why are they allowed. Counting branches, we have 18 branches that shouldn’t have been created in the first place, over the course of a month (presumably; I’m going to expand on this below).
It’s not my intention to put any blame on creators of those branches, as git push
doesn’t tell anyone how user branches are supposed to be used. But I’d like to call decision to enable branches in monorepo premature, which apparently was documented as a post buried in a long thread about GitHub PR. It wasn’t an RFC, and the way it’s phrased (“We have user-branches opened in the repo”) doesn’t give a clear message when this actually happened.
I recognize that some projects in the monorepo need a solution for stacked PRs, and that there’s no good-all-around solution, but I see damage being done. One of the forms this damage manifests itself in is various git graph visualizers, that are becoming harder to comprehend as number of branches goes up. I’ve worked in monorepos with thousands of branches, and definitely don’t want LLVM to end up there.
If we really need users to be able to create branches, one of the ways forward might be to have an issue opened, where users can do that via a bot. This both gives us opportunity to tell people what branches in the monorepo are for, and gives a good place to ask about stale branches.
I propose to phase out ability to directly push branches in a timely fashion (think weeks, not months), as something that was done without a proper RFC, and is actively harmful. Then we can work on a solution that doesn’t make the whole community pay for something that is used by a rather small subset of contributors.
[1] I don’t know much about SPR, so I’ve been looking for spr
in branch names and commit messages. This might not be the most way to count, so corrections are welcome.