Skip to content

Commit 53ae515

Browse files
authored
Merge pull request #219 from rspec/announce-the-monorepo
Announce monorepo
2 parents 85f3381 + cb801d7 commit 53ae515

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Introducing the RSpec monorepo, and some updates on the future of RSpec.
3+
author: Jon Rowe
4+
no_comments: true
5+
publish: true
6+
---
7+
8+
## The quick version
9+
10+
We're switching to a monorepo out of the `rspec/rspec` repository on Github. The `main`
11+
branch is a combination of all the repos `main` branches, `dev` is rebased on this during
12+
the transition phase with the intent of `main` becoming the default when this is complete.
13+
14+
Please switch any git dependencies to at least `main` if not `dev`.
15+
16+
## The full story...
17+
18+
Since the early days of RSpec, it has consisted of multiple gems. The trio of
19+
`rspec-core`, `rspec-expectations` and `rspec-mocks` containing the bulk of
20+
the code, with the `rspec` metagem just deferring to these, and eventually the
21+
`rspec-support` gem containing shared code.
22+
23+
At the time of creation these were all individual repos, and they have remained as such over
24+
the lifetime of RSpec. There is an additional core repository, `rspec-dev` that contains tools
25+
for dealing with the multiple repositories, creating PRs with shared updates, dealing with our
26+
various maintenance branches.
27+
28+
Over time this situation has made it harder to coordinate work, for example requiring pinning PRs
29+
against each other; harder to fix simple issues, for example you can't just edit a CI file to fix
30+
an issue, you have to do so in rspec-dev, run commands to run them against all repositories, then
31+
rebase off a maintenance branch and do so again; and harder to perform releases beyond single
32+
repository patch versions.
33+
34+
We have been wanting to combine the repositories into one for some time, and it was just a matter
35+
of finding the "right time", one of our alumni Yuji Nakayama, who wrote a great upgrade tool for
36+
RSpec 2 to 3, also created the repository_merger gem that makes this possible.
37+
38+
But somehow it was never the right time, so finally, we're just jumping in and doing it...
39+
40+
So from this week, RSpec is now a monorepo for all future development.
41+
42+
## Step we intend to take
43+
44+
1. Make the `rspec` repo public, its been private as a work in progress but now we're ready for help.
45+
2. Transfer any open issues from the various repositories to the monorepo, then prevent new ones from
46+
being opened, and update the repo's READMEs.
47+
3. Work on bringing the build for `3-13-maintenance` across so patches can be issued from the monorepo,
48+
but if we fail at this we will publish and backport any patches required across to the old repositories.
49+
4. Bring across the remaining rspec-dev tooling, for example documentation generation, into the monorepo.
50+
5. Bring across any PRs that can be salvaged, this may seem harsh but some are quite stale at this
51+
point, and they can always be reopened once rebased off the new repository. This has honestly
52+
been the main pain point for switching to a monorepo.
53+
54+
## What's next?
55+
56+
After the monorepo has stabilised, with its `main` being the default branch, what else does the future
57+
hold for RSpec?
58+
59+
Our immediate plan has always been to begin resurrecting the RSpec 4 work that has languished, but
60+
pragmatism here leads me to say that some of those changes may be postponed, but the next version of
61+
the core gems will be at least "a version of RSpec 4", with some of the things we previously wanted
62+
to bring forward within it, and later improvements to follow.
63+
64+
Primarily though we will be using the opportunity to change our supported Ruby policy, previously we
65+
have stuck with a very strict version of semver where we considered dropping Ruby versions a breaking
66+
change, hence our current build supports all the way back to 1.8.7. Yes you heard that right. Pretty
67+
prehistoric.
68+
69+
In RSpec 4 we will be changing that policy to "currently supported Rubies at time of minor release",
70+
what this means is we may update the minimum required Ruby version in our gem specs on minor release
71+
versions in future. Given our policy of only supporting the latest major/minor pair this means essentially
72+
that once a Ruby version is end of life, maintenance support for it will cease in RSpec.
73+
74+
Again this may seem harsh given our previous "we will be the last to drop support" policy, but Ruby
75+
has stabilised so much over the decade since we released RSpec 3, the inconsistencies in versions
76+
are largely ironed out.. (barring the pretty consequential changes of keyword arguments from Ruby 2.x to 3.x)
77+
and with our slow release cadence I think this is a sensible change for making it easier to maintain RSpec
78+
for the next decade. We still won't rush to remove support for any widely used Ruby, but we are formally
79+
stating we reserve the right to do so within our versioning policy.

0 commit comments

Comments
 (0)