Visibility
Finding and discovering code
Development in the open
Code sharing
Cross-pollination
@geewiz ● DrupalCamp Scotland 2019 9 / 28
Slide 10
Slide 10 text
Synchronisation
Single history timeline
Full-scope CI/CD
Version-less dependency management
Atomic cross-cutting changes
@geewiz ● DrupalCamp Scotland 2019 10 / 28
Slide 11
Slide 11 text
Dependency management
From "pull" to "push":
Pull Dependency Management: Consumer is
responsible
Push Dependency Management: Maintainer is
responsible
@geewiz ● DrupalCamp Scotland 2019 11 / 28
Slide 12
Slide 12 text
You break it, you fix it.
@geewiz ● DrupalCamp Scotland 2019 12 / 28
Slide 13
Slide 13 text
Completeness
No external dependencies
No downloads
No "download failed"
@geewiz ● DrupalCamp Scotland 2019 13 / 28
Slide 14
Slide 14 text
Standardisation
Central issue tracking
Common tooling
Common practices (testing etc)
Single CI integration
Shared coding style guides
@geewiz ● DrupalCamp Scotland 2019 14 / 28
Weaknesses
Volume of code
Intimidating
Long build times
IDE lag
Unclear ownership
New tooling
Broken master
!
@geewiz ● DrupalCamp Scotland 2019 16 / 28
Slide 17
Slide 17 text
Monorepo best practices
Build everything from source for every change
Have clear ownership
Set a file size limit
Avoid breaking changes
Use feature flags
Use only short-lived branches
@geewiz ● DrupalCamp Scotland 2019 17 / 28
Slide 18
Slide 18 text
Trunk Based Development
"A source-control branching model, where
developers collaborate on code in a single
branch called ‘trunk’, resist any pressure to
create other long-lived development branches
by employing documented techniques. They
therefore avoid merge hell, do not break the
build, and live happily ever after."
trunkbaseddevelopment.com
@geewiz ● DrupalCamp Scotland 2019 18 / 28
The "Splitrepo" hybrid
A monorepo split into read-only project repositories
Example: symfony/symfony splits into:
symfony/console
symfony/dom-crawler
etc
@geewiz ● DrupalCamp Scotland 2019 22 / 28
Slide 23
Slide 23 text
Splitting a monorepo
git subtree split
git filter-branch
Monorepo-specific tools, e.g. split.sh
@geewiz ● DrupalCamp Scotland 2019 23 / 28
Slide 24
Slide 24 text
Using git (lter-branch to split a monorepo
@geewiz ● DrupalCamp Scotland 2019 24 / 28
Slide 25
Slide 25 text
Learn more
@geewiz ● DrupalCamp Scotland 2019 25 / 28
Slide 26
Slide 26 text
Background
Awesome Monorepo
Monorepos in Git
Monorepo: From Zero to Hero
Advantages of Monolithic Version Control
Monorepo? Please do!
Why don't you have a monorepo?
Advantages and Disadvantages of a Monolithic
Codebase
@geewiz ● DrupalCamp Scotland 2019 26 / 28
Slide 27
Slide 27 text
Case studies
"Why is Babel a monorepo?"
"Monorepo to Multirepo and back again"
"The Symfony Monolith Repository"
"The Many Benefits of a Monorepo"
@geewiz ● DrupalCamp Scotland 2019 27 / 28