-
-
Notifications
You must be signed in to change notification settings - Fork 753
Updates from rspec-dev (2020-12-23) #2813
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo. | ||
# This file was generated on 2020-12-23T21:23:59+01:00 from the rspec-dev repo. | ||
# DO NOT modify it by hand as your changes will get lost the next time it is generated. | ||
|
||
github: [JonRowe] | ||
github: [JonRowe, benoittgt] | ||
open_collective: rspec |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!--- | ||
This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo. | ||
This file was generated on 2020-12-23T21:23:59+01:00 from the rspec-dev repo. | ||
DO NOT modify it by hand as your changes will get lost the next time it is generated. | ||
--> | ||
|
||
|
@@ -42,3 +42,45 @@ test case. To make this process easier, we have prepared one basic | |
Maintenance branches are how we manage the different supported point releases | ||
of RSpec. As such, while they might look like good candidates to merge into | ||
main, please do not open pull requests to merge them. | ||
|
||
## Working on multiple RSpec gems at the same time | ||
|
||
RSpec is composed of multiple gems (`rspec-core`, `rspec-mocks`, etc). Sometimes you have | ||
to work on a combination of them at the same time. When submitting your code for review, | ||
we ask that you get a passing build (green CI). If you are working across the repositories, | ||
please add a commit that temporarily pins your PR to the right branch of the other repository | ||
you depend on. For example, if we wanted a change in `rspec-expectations` that relied on a | ||
change for on `rspec-mocks`. We add a commit with the title: | ||
|
||
>[WIP] Use rspec-mocks with "custom-failure-message" branch | ||
|
||
And content: | ||
|
||
```diff | ||
diff --git a/Gemfile b/Gemfile | ||
|
||
-%w[rspec rspec-core rspec-mocks rspec-support].each do |lib| | ||
+%w[rspec rspec-core rspec-support].each do |lib| | ||
library_path = File.expand_path("../../#{lib}", __FILE__) | ||
if File.exist?(library_path) && !ENV['USE_GIT_REPOS'] | ||
gem lib, :path => library_path | ||
@@ -11,6 +11,7 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp | ||
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch | ||
end | ||
end | ||
+gem 'rspec-mocks', :git => "https://github.com/rspec/rspec-mocks.git", :branch => "custom-failure-message" | ||
``` | ||
|
||
In general the process is: | ||
1. Create PRs explaining what you are trying to achieve. | ||
2. Pin the repositories to each other. | ||
3. Check they pass (go green). | ||
4. Await review if appropriate. | ||
5. Remove the commit from one. We will merge ignoring the failure. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it is meant to be "from step 2", not one. |
||
6. Remove the commit from the other, check it passes with the other commit now on main. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the way, it won't if we delete the merged PR branch. |
||
7. Merge the other. | ||
8. Rebuild the other main to check it still passes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we trigger "main" by hand? |
||
|
||
Steps 5-8 should happen contiguously (e.g. one after another but within a short timespan) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in "contiguously" |
||
so that we don't leave a broken main around. It is important to triage that build process | ||
and revert if necessary. |
Uh oh!
There was an error while loading. Please reload this page.