-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Split monorepo up into several repos #1724
Comments
I'll move |
Maybe we could do that in conjunction with #1614? |
While it is possible to bring commit history when moving from one repo to another, I suggest we don't do it because it's tedious to do. People who need to look at the history will find it in this repo. |
We can retain the history for the new repos, for just the subtree that's being imported. I'd much prefer, as a consumer of Cucumber, to be able to view the history in the new repo, rather than jumping around. I've done it before using Option 3 in https://stackoverflow.com/a/30386041 and it works nicely. |
Thanks for the info @jamietanna! If we have the possibility to keep the history, that would be great indeed! |
Ok, I'm sure we can do that :-) |
I'm proposing we start by creating the following new repositories:
This will hollow out about half of the monorepo. Eventually I would like to have everything moved out so we can retire the monorepo, but let's start with this. |
Beside that, looks good 👍 |
Why? I'm proposing we move it along with all the implementations so the directory structure will be like this:
|
Oh, Sorry for that. So yes, looks good 👍 |
We have two kinds:
|
@aslakhellesoy I'll move |
Looks like this worked for me. But notice the big disclaimer. Probably good to follow it. |
Which disclaimer? |
@mattwynne and I experimented a bit today, trying to create a new (local) repo for cucumber-expressions. We used this:
We also talked about work to do after that: Cleanup
Not doing
Elsewhere
...to be continued... |
I wrote a gist based on the experiments @mattwynne and I did a couple of days ago: https://gist.github.com/aslakhellesoy/3cb73d9b69c28b497710b78baf0d3ec5 It seems to work well creating a new
Any suggestions/feedback before we push this as a new repo and remove |
As far as I can tell, it looks good 👌 |
I have created https://github.com/cucumber/cucumber-expressions Here are some more notes on what needs to be done to finish the work (we can reuse this checklist for other moves) Push new repoAfter creating a local repo:
Configure Renovate
Configure Repo
Set up CI
Cleanup
Migrate documentation
Make a releaseThis will require some more work since the release scripts are not migrated over from the |
For the CI, I did not use any kinda makefiles. I've directly written git workflows. That seems fine for cucumber-expressions as all the tests are easily executed from commands like And we are actually working on some release process throw git workflow too. So, maybe the Makefile could be greatly simplified to be used to run the docker container, and eventually some global clean tasks? |
On debian linux, we had to tweak the script (https://gist.github.com/aslakhellesoy/3cb73d9b69c28b497710b78baf0d3ec5) a little bit: # Delete all other tags
- git tag | grep --invert-match -E '^go/v\d|^v\d' | \
+ git tag | grep --invert-match -E '^go/v[0-9]|^v[0-9]' | \
xargs -n1 git tag -d # Modify CHANGELOG.md links. Remove the '' if not on MacOS.
- sed -i '' "s|${name}-||g" CHANGELOG.md
- sed -i '' "s|${name}/||g" CHANGELOG.md
- sed -i '' "s|https://github.com/cucumber/common/compare|https://github.com/cucumber/${name}/compare|" CHANGELOG.md
- sed -i '' "s|https://github.com/cucumber/cucumber/compare|https://github.com/cucumber/${name}/compare|" CHANGELOG.md
+ sed -i "s|${name}-||g" CHANGELOG.md
+ sed -i "s|${name}/||g" CHANGELOG.md
+ sed -i "s|https://github.com/cucumber/common/compare|https://github.com/cucumber/${name}/compare|" CHANGELOG.md
+ sed -i "s|https://github.com/cucumber/cucumber/compare|https://github.com/cucumber/${name}/compare|" CHANGELOG.md
We also had to make sure to use git version >= 2.22 |
Create-meta is done! |
@aslakhellesoy any thoughts on which package to tackle next? @aurelien-reeves and I discussed this a bit today on voice, but we don't have a clear plan as yet. It feels like the CCK, gherkin and messages are the big ones that remain. |
I propose gherkin, then messages, then cck. When we move out Gherkin we should get rid of make too, which means replacing the make based tests with unit testing tool tests. These tests will be much faster (no executable to The cucumber-expressions and create-meta repos already use this technique, have a look at that. The gherkin/elixir tests already use this approach. |
Have we discussed how to deal with formatters in this split yet? I was thinking about splitting out It does have a dependency on |
@davidjgoss yeah I hadn't thought about it too hard yet, but I agree the the html formatter is definitely something that could do with standing alone. I wouldn't be averse to moving the @cucumber/react module along with it if that will make it easier to change. |
Let's use this project to track progress from now on. |
Is your feature request related to a problem? Please describe.
There are several problems with the
cucumber/common
monorepo:Describe the solution you'd like
I want to split
cucumber/common
up into multiple repos:java
,javascript
,ruby
etc subdirectories)cucumber/cucumber-expressions
cucumber/tag-expressions
cucumber/gherkin
cucumber/language-service
cucumber/language-server
cucumber/vscode
cucumber/monaco
cucumber/react
The current build system has complex functionality that we'd have to replace:
cucumber/eslint
,cucumber/tsconfig
etc. git repos.cucumber/release
git repo and use from Docker when doing a releaseAlso see discussion in Slack
Describe alternatives you've considered
We could probably push ahead with #1720 and make the current monorepo serial build run in a few seconds (by leveraging a cache in the cloud), but the build process would still be complex and brittle. Newcomers would still be intimidated by size and complexity of this huge repo.
Additional context
In 2015 the Cucumber implementations had diverged and behaved inconsistently. Each release made them more inconsistent. To mitigate this we decided to bring all the Gherkin implementations into one repository, using a shared acceptance test suite.
This worked well, so we continued with the same approach for new libraries such as Cucumber Expressions and Tag Expressions - in the same repo.
Building and in particular releasing libraries in 10 or so languages is complicated, so we built an "orchestration" build system with Make that makes the build process consistent across the increasing number of libraries.
Fast forward six years, and we have a build system with fangs, tentacles and worts. The build system wasn't designed with parallelism in mind, which is why it takes 1h.
TODO
The text was updated successfully, but these errors were encountered: