@@ -37,3 +37,45 @@ test case. To make this process easier, we have prepared one basic
3737Maintenance branches are how we manage the different supported point releases
3838of RSpec. As such, while they might look like good candidates to merge into
3939master, please do not open pull requests to merge them.
40+
41+ ## Working on multiple RSpec gems at the same time
42+
43+ RSpec is composed of multiple gems (`rspec-core`, `rspec-mocks`, etc). Sometimes you have
44+ to work on a combination of them at the same time. When submitting your code for review,
45+ we ask that you get a passing build (green CI). If you are working across the repositories,
46+ please add a commit that temporarily pins your PR to the right branch of the other repository
47+ you depend on. For example, if we wanted a change in `rspec-expectations` that relied on a
48+ change for on `rspec-mocks`. We add a commit with the title:
49+
50+ > [WIP] Use rspec-mocks with "custom-failure-message" branch
51+
52+ And content:
53+
54+ ```diff
55+ diff --git a/Gemfile b/Gemfile
56+
57+ -%w[rspec rspec-core rspec-mocks rspec-support].each do |lib|
58+ +%w[rspec rspec-core rspec-support].each do |lib|
59+ library_path = File.expand_path("../../#{lib}", __FILE__)
60+ if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
61+ gem lib, :path => library_path
62+ @@ -11,6 +11,7 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
63+ gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch
64+ end
65+ end
66+ +gem 'rspec-mocks', :git => "https://github.com/rspec/rspec-mocks.git", :branch => "custom-failure-message"
67+ ```
68+
69+ In general the process is:
70+ 1. Create PRs explaining what you are trying to achieve.
71+ 1. Pin the repositories to each other.
72+ 2. Check they pass (go green).
73+ 3. Await review if appropriate.
74+ 4. Remove the commit from one. We will merge ignoring the failure.
75+ 5. Remove the commit from the other, check it passes with the other commit now on master.
76+ 6. Merge the other.
77+ 7. Rebuild the other master to check it still passes.
78+
79+ Steps 4-7 should happen contiguously (e.g. one after another but within a short timespan)
80+ so that we don't leave a broken master around. It is important to triage that build process
81+ and revert if necessary.
0 commit comments