22

Over time, even well-managed projects risk losing design consistency as contributors add code in slightly different styles. Beyond code review, what strategies keep large open-source projects internally consistent over years?

10
  • 11
    Your title refers to design, but the body of your text refers to style. They are very different problems to solve - could you clarify which you are referring to as to some extent the two answers you've got are for the two different questions? Commented Oct 6 at 12:15
  • 11
    In one case, having Linus Torvald as overall gatekeeper :-). He sears the earth as if a mighty dragon when he disapproves of unnacceptable additions to his life's work. Commented Oct 6 at 13:34
  • While a project may have hundreds of contributors (and probably many, many more in some cases), there are usually only a limited set of maintainers which will approve changes (or not) before they are actually merged. Commented Oct 7 at 14:57
  • 4
    Note that there's nothing particularly special about open-source projects in this respect. Big closed-source developments deal with much the same challenges, since any team of more than a few dozen people is going to be too big to easily maintain consistency across everything. Commented Oct 8 at 3:47
  • 4
    Code style is trivial and isn't the same as design. Which one are you asking about? Commented Oct 8 at 6:35

2 Answers 2

23

There are numerous techniques available, many of which are not mutually exclusive. Just a few examples that I've seen:

  • Linters that apply automatic corrections. For code style conventions, some linters allow for some rules to be automatically applied to the codebase. These checks can be run on pull requests, ensuring code that adheres to style guides.
  • Blocking pull requests that don't meet conventions. Whether it's insufficient code coverage of changes, automated test failures, issues discovered by static analysis, or some other check, if the check fails, feedback can be provided to the contributor regarding the corrections that need to be made. Humans may only review pull requests that otherwise pass all automated checks.
  • Core contributors reviewing all changes. A small project may have one or a small number of reviewers who must approve changes. Larger projects may have people who own specific areas of the system. Depending on the change and the elements of the system it affects, the appropriate core contributors must review and approve the change.
  • Not allowing open submission. Contributors may need to propose sufficiently detailed ideas and obtain support before they are allowed to contribute. If there's insufficient broad support for the idea, it may not even be looked at. Some projects may not accept submissions from outside the core team, only allowing forks of the open-source project.
1
  • 1
    This is really helpful, thank you! I appreciate the breakdown of how open-source projects use a mix of automation, review policies, and contributor governance to stay consistent over time. It’s great to see how these layers reinforce each other in large communities. Commented Oct 9 at 22:25
21

Frame challenge. Design drift due to the influence of a community of contributors can be the thing that makes a FOSS project successful, not a thing to be avoided. One interesting example of this is Graydon Hoare's writing on the evolution of Rust, where the community have taken it in a direction he would not have done, and he feels it has been more successful as a result.

1
  • That’s an excellent perspective, thanks! I really like the idea that open-source design drift can sometimes represent collective progress rather than disorder. The Rust example captures that perfectly. Commented Oct 9 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.