<s>
In	O
version-control	B-Architecture
systems	I-Architecture
,	O
a	O
monorepo	B-General_Concept
(	O
"	O
mono	O
"	O
meaning	O
'	O
single	O
 '	O
and	O
"	O
repo	O
"	O
being	O
short	O
for	O
'	O
repository	B-General_Concept
 '	O
)	O
is	O
a	O
software-development	O
strategy	O
in	O
which	O
the	O
code	O
for	O
a	O
number	O
of	O
projects	O
is	O
stored	O
in	O
the	O
same	O
repository	B-General_Concept
.	O
</s>
<s>
Google	B-Application
,	O
Meta	O
,	O
Microsoft	O
,	O
Uber	B-Application
,	O
Airbnb	O
,	O
and	O
Twitter	B-Application
all	O
employ	O
very	O
large	O
monorepos	B-General_Concept
with	O
varying	O
strategies	O
to	O
scale	O
build	B-Application
systems	I-Application
and	O
version	B-Architecture
control	I-Architecture
software	I-Architecture
with	O
a	O
large	O
volume	O
of	O
code	O
and	O
daily	O
changes	O
.	O
</s>
<s>
A	O
related	O
concept	O
is	O
the	O
monolithic	B-General_Concept
application	I-General_Concept
,	O
but	O
whereas	O
a	O
monolith	O
combines	O
its	O
sub-projects	O
into	O
one	O
large	O
project	O
,	O
a	O
monorepo	B-General_Concept
may	O
contain	O
multiple	O
independent	O
projects	O
.	O
</s>
<s>
There	O
are	O
a	O
number	O
of	O
potential	O
advantages	O
to	O
a	O
monorepo	B-General_Concept
over	O
individual	O
repositories	B-General_Concept
:	O
</s>
<s>
Similar	O
functionality	O
or	O
communication	O
protocols	O
can	O
be	O
abstracted	O
into	O
shared	O
libraries	O
and	O
directly	O
included	O
by	O
projects	O
,	O
without	O
the	O
need	O
of	O
a	O
dependency	O
package	B-Application
manager	I-Application
.	O
</s>
<s>
In	O
a	O
multiple	O
repository	B-General_Concept
environment	O
where	O
multiple	O
projects	O
depend	O
on	O
a	O
third-party	O
dependency	O
,	O
that	O
dependency	O
might	O
be	O
downloaded	O
or	O
built	O
multiple	O
times	O
.	O
</s>
<s>
In	O
a	O
monorepo	B-General_Concept
the	O
build	O
can	O
be	O
easily	O
optimized	O
,	O
as	O
referenced	O
dependencies	O
all	O
exist	O
in	O
the	O
same	O
codebase	O
.	O
</s>
<s>
When	O
projects	O
that	O
work	O
together	O
are	O
contained	O
in	O
separate	O
repositories	B-General_Concept
,	O
releases	O
need	O
to	O
sync	O
which	O
versions	O
of	O
one	O
project	O
work	O
with	O
the	O
other	O
.	O
</s>
<s>
And	O
in	O
large	O
enough	O
projects	O
,	O
managing	O
compatible	O
versions	O
between	O
dependencies	O
can	O
become	O
dependency	B-Protocol
hell	I-Protocol
.	O
</s>
<s>
In	O
a	O
monorepo	B-General_Concept
this	O
problem	O
can	O
be	O
negated	O
,	O
since	O
developers	O
may	O
change	O
multiple	O
projects	O
atomically	O
.	O
</s>
<s>
In	O
a	O
monorepo	B-General_Concept
that	O
uses	O
source	O
dependencies	O
(	O
dependencies	O
that	O
are	O
compiled	O
from	O
source	O
)	O
,	O
teams	O
can	O
improve	O
projects	O
being	O
worked	O
on	O
by	O
other	O
teams	O
.	O
</s>
<s>
Although	O
not	O
required	O
,	O
some	O
monorepo	B-General_Concept
builds	O
use	O
one	O
version	O
number	O
across	O
all	O
projects	O
in	O
the	O
repository	B-General_Concept
.	O
</s>
<s>
With	O
split	O
repositories	B-General_Concept
,	O
access	O
to	O
a	O
repository	B-General_Concept
can	O
be	O
granted	O
based	O
upon	O
need	O
.	O
</s>
<s>
A	O
monorepo	B-General_Concept
allows	O
read	O
access	O
to	O
all	O
software	O
in	O
the	O
project	O
,	O
possibly	O
presenting	O
new	O
security	O
issues	O
.	O
</s>
<s>
Note	O
that	O
there	O
are	O
versioning	B-Architecture
systems	I-Architecture
in	O
which	O
this	O
limitation	O
is	O
not	O
an	O
issue	O
.	O
</s>
<s>
For	O
example	O
,	O
when	O
Subversion	B-Application
is	O
used	O
,	O
it	O
's	O
possible	O
to	O
download	O
any	O
part	O
of	O
the	O
repo	O
(	O
even	O
a	O
single	O
directory	O
)	O
,	O
and	O
path-based	O
authorization	O
can	O
be	O
used	O
to	O
restrict	O
access	O
to	O
certain	O
parts	O
of	O
a	O
repository	B-General_Concept
.	O
</s>
<s>
With	O
split	O
repositories	B-General_Concept
,	O
you	O
fetch	O
only	O
the	O
project	O
you	O
are	O
interested	O
in	O
by	O
default	O
.	O
</s>
<s>
With	O
a	O
monorepo	B-General_Concept
,	O
you	O
check	O
out	O
all	O
projects	O
by	O
default	O
.	O
</s>
<s>
While	O
all	O
versioning	B-Architecture
systems	I-Architecture
have	O
a	O
mechanism	O
to	O
do	O
a	O
partial	O
checkout	O
,	O
doing	O
so	O
defeats	O
some	O
of	O
the	O
advantages	O
of	O
a	O
monorepo	B-General_Concept
.	O
</s>
<s>
Companies	O
with	O
large	O
projects	O
have	O
come	O
across	O
hurdles	O
with	O
monorepos	B-General_Concept
,	O
specifically	O
concerning	O
build	B-Application
tools	I-Application
and	O
version	B-Architecture
control	I-Architecture
systems	I-Architecture
.	O
</s>
<s>
Google	B-Application
's	I-Application
monorepo	B-General_Concept
,	O
speculated	O
to	O
be	O
the	O
largest	O
in	O
the	O
world	O
,	O
meets	O
the	O
classification	O
of	O
an	O
ultra-large-scale	B-General_Concept
system	I-General_Concept
and	O
must	O
handle	O
tens	O
of	O
thousands	O
of	O
contributions	O
every	O
day	O
in	O
a	O
repository	B-General_Concept
over	O
80	O
terabytes	O
in	O
size	O
.	O
</s>
<s>
Companies	O
using	O
or	O
switching	O
to	O
existing	O
version	B-Architecture
control	I-Architecture
software	I-Architecture
found	O
that	O
software	O
could	O
not	O
efficiently	O
handle	O
the	O
amount	O
of	O
data	O
required	O
for	O
a	O
large	O
monorepo	B-General_Concept
.	O
</s>
<s>
Facebook	O
and	O
Microsoft	O
chose	O
to	O
contribute	O
to	O
or	O
fork	O
existing	O
version	B-Architecture
control	I-Architecture
software	I-Architecture
Mercurial	B-Protocol
and	O
Git	B-Application
respectively	O
,	O
while	O
Google	B-Application
eventually	O
created	O
their	O
own	O
version	B-Architecture
control	I-Architecture
system	I-Architecture
.	O
</s>
<s>
For	O
more	O
than	O
ten	O
years	O
,	O
Google	B-Application
had	O
relied	O
on	O
Perforce	B-General_Concept
hosted	O
on	O
a	O
single	O
machine	O
.	O
</s>
<s>
In	O
2005	O
Google	B-Application
's	I-Application
build	O
servers	O
could	O
get	O
locked	O
up	O
to	O
10	O
minutes	O
at	O
a	O
time	O
.	O
</s>
<s>
Google	B-Application
improved	O
this	O
to	O
30	O
seconds	O
–	O
1	O
minute	O
in	O
2010	O
.	O
</s>
<s>
Due	O
to	O
scaling	O
issues	O
,	O
Google	B-Application
eventually	O
developed	O
its	O
own	O
in-house	O
distributed	O
version	B-Architecture
control	I-Architecture
system	I-Architecture
dubbed	O
Piper	B-General_Concept
.	O
</s>
<s>
Facebook	O
ran	O
into	O
performance	O
issues	O
with	O
the	O
version	B-Architecture
control	I-Architecture
system	I-Architecture
Mercurial	B-Protocol
and	O
made	O
upstream	B-General_Concept
contributions	O
to	O
the	O
client	O
,	O
and	O
in	O
January	O
2014	O
made	O
it	O
faster	O
than	O
a	O
competing	O
solution	O
in	O
Git	B-Application
.	O
</s>
<s>
In	O
May	O
2017	O
Microsoft	O
announced	O
that	O
virtually	O
all	O
of	O
its	O
Windows	O
engineers	O
use	O
a	O
Git	B-Application
monorepo	B-General_Concept
.	O
</s>
<s>
In	O
the	O
transition	O
,	O
Microsoft	O
made	O
substantial	O
upstream	B-General_Concept
contributions	O
to	O
the	O
Git	B-Application
client	O
to	O
remove	O
unnecessary	O
file	O
access	O
and	O
improve	O
handling	O
of	O
large	O
files	O
with	O
Virtual	B-Application
File	I-Application
System	I-Application
for	I-Application
Git	I-Application
.	O
</s>
<s>
Few	O
build	B-Application
tools	I-Application
work	O
well	O
in	O
a	O
monorepo	B-General_Concept
,	O
and	O
flows	O
where	O
builds	O
and	O
continuous	O
integration	O
testing	O
of	O
the	O
entire	O
repository	B-General_Concept
are	O
performed	O
upon	O
check-in	O
will	O
cause	O
performance	O
problems	O
.	O
</s>
<s>
Directed	O
graph	O
builds	O
systems	O
like	O
Buck	B-Application
,	O
Bazel	B-Application
,	O
Pants	B-General_Concept
,	O
and	O
Please	B-General_Concept
solve	O
this	O
by	O
compartmentalizing	O
builds	O
and	O
tests	O
to	O
the	O
active	O
area	O
of	O
development	O
.	O
</s>
<s>
Twitter	B-Application
began	O
development	O
of	O
Pants	B-General_Concept
in	O
2011	O
,	O
as	O
both	O
Facebook	O
's	O
Buck	B-Application
and	O
Google	B-Application
's	I-Application
Bazel	B-Application
were	O
closed-source	O
at	O
the	O
time	O
.	O
</s>
<s>
Twitter	B-Application
open-sourced	O
Pants	B-General_Concept
in	O
2012	O
under	O
the	O
Apache	O
2.0	O
License	O
.	O
</s>
<s>
Please	B-General_Concept
,	O
a	O
Go-based	O
build	B-Application
system	I-Application
,	O
was	O
developed	O
in	O
2016	O
by	O
Thought	O
Machine	O
who	O
was	O
also	O
inspired	O
by	O
Google	B-Application
's	I-Application
Bazel	B-Application
and	O
dissatisfied	O
with	O
Facebook	O
's	O
Buck	B-Application
.	O
</s>
