-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge rspec repos #48
base: main
Are you sure you want to change the base?
Conversation
Defaulted most new things to off, though tried to keep performance and linters.
$SAFE became a global variable in Ruby 2.6
* Added @Private tag for nested class (no longer inherits). * Included full method definition in generated should/should_not docs. * Used const_set for constant redefinition, since using = confuses YARD. * Added short descriptions to methods that are @api private. Could probably just @Private the lot but didn't want to make that decision here.
Update yard to 0.9.12, motivated by CVE.
Upgrade rubocop, motivated by CVE.
* If it quacks like a Hash, treat it like a Hash * DRY * Not loaded by default in old Rubies * Trying to get the build passing... * No need to put this on Relish * Not much value to pseudo-hashes allowed as expecteds
[ci skip]
Upgrade rubocop, motivated by CVE.
We did not offer it when the BisectFormatter was written but it nicely simplifies it now. Also, get the expected failures in `initialize` instead of `start`.
Simplify BisectFormatter using `example_finished` notification.
It is not going to be needed for the ForkRunner, but it will have its own lifecycle to manage, so `start { }` makes a convenient interface for both.
Also, rename the bisect formatter to indicate it communicates over DRb.
Also, move it to `utilities` as the server will not always be loaded.
This is useful for when you want to initialize your formatter with extra state. The simplest approach is for you to instantiate the formatter yourself instead of depending on RSpec to do it and trying to update the formatter with your desired state later.
…n_configuration [#2494] Add yard return values to Rspec::Core::Configuration
Nicely handle errors encountered from processing `--require`.
…ings Bisect forker prep refactorings
Use a simple `Notifier` instead of the full-fledged `Reporter` (which required the use of config). Avoiding config is necessary for us to be able to use the new forking runner for bisect.
Avoid using `RSpec.configuration` from the bisect coordinator.
@pirj Sorry for the late reply.
It can now also create branches for different versions.
|
I'll see if I can make a PR for the mono-repo-prototype and get the build running. |
Thanks for pushing this forward! |
I can now run the specs for all sub repo's in the rspec-monorepo-protoype: |
Hmm, weird I'm not seeing Travis in the checks anymore. |
Wow, nice, good job! |
Yes, the problem was that my branch could not merge to master. |
I guess the problem to the red builds might be this little thing. |
Yes, setting the dist to trusty fixes it on travis: |
Maybe |
@p8 Have you had a chance to take a look at the |
@pirj I'll try to have a look this week. |
@pirj The script now merges the repo's, adds the travis config, and runs script/run_build in every subrepo. So Rubocop, Cucumber and other checks are run as well. And the build is green: https://travis-ci.org/github/p8/rspec-monorepo-prototype/builds/679697190 |
Awesome! |
So I've created a branch called setup on https://github.com/rspec/rspec-monorepo-prototype which contains this script and have run it to create Some thoughts I have so far are that, we are going to lose a large amount of our history in the form of PR references and overlaps, but I'm not sure how we can do much about that. We're also going to need to work on all of our tags to get them into line, otherwise they will overwrite one another... We'd also need to transfer all open issues from the other repos to the monorepo. I've reviewed @p8's build and it works but would need tweaking / optimising afterwards, specifically I think we might actually want to break out the individual specs in a matrix, maybe this would also be a good opportunity to use Github actions, but my branches seem not to want to run for some reason |
Nice!
I guess we can add a repo prefix to tags for all repos before merging them.
That might be solvable, but I don't have a good idea how exactly. Before
And even though those pull request won't exist in the resulting repo, the pull request heads will. It makes sense to add those two tweaks to the merge script. @p8 Good job! |
Its more that we have commits which reference the pull request number, which would not exist in the new repo, but the old repos will continue to exist, we'll just archive them |
I can start again my investigation on this. :) For the tags, if we choose to prefix them. I am wondering how will manage the github release page |
This is how rails handles it https://github.com/rails/rails/releases They just release all versions in lock step, maybe thats easier, we could adopt that from rspec 4 |
I am in favor of this. |
@p8 I can take it from here, add tag prefixes and keep PR references, if you don't want to continue. |
@pirj Sure, glad I could help :) |
It'd be great to get this over the line. TBH I feel it's a huge pain to work with so many git repos, issue trackers, separate projects for PRs, etc. This probably also drives potential contributors away, because to contribute to RSpec one needs a far more complicated setup than about any other gem. |
@eregon Making contributing easier was one of my motivations for working on this. |
I'd love to merge the repos into one, but its something that will take time to do correctly and my intention was to coordinate this change with an RSpec 4 release, believe me its just as much of a maintainer headache as it is a contributor one, especially when it comes down to coordinating 4 releases of gems, but there is also a large time cost involved in merging the repos, verifying that everything is correct and then sorting out the history of github issues, that last part was my main reason for targeting a major version release, hopefully that would create a sort of minima of issues to transfer. |
Wouldn't the issues be copied to the monorepo (maybe with an appropriate tag) and then that would be mostly automatic, except for the script/GitHub Action doing that migration? If so I don't think it would change things much whether it's done at the same time than a RSpec 4 release, and it might even be helpful to not have to do both tasks around the same time. |
Proof of concept for merging the other repos into this repo while keeping all history (See: rspec/rspec-core#2509).
I had some success with the steps described here (https://thoughts.t37.net/merging-2-different-git-repositories-without-losing-your-history-de7a06bba804