-
Notifications
You must be signed in to change notification settings - Fork 123
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
Monorepository tools and recomendations #64
Comments
We use monorepo at TWC. We use yarn workspace. Would love to contribute to this topic, however I understand this can also be opinionated too. |
@roastlechon +1 for putting something simple out there. You have my vote for yarn workspace. It is opiniated topics but I do not have opinions and simply looking to get something that works. I'm researching this right now for other things and see struggle - yarn workspaces is ok but do leave tons of things to setup yourself. For the moment I love semantic releases (because it could resolve also versioning problem) vs changesets. The worst choice seem to be lerna - tons of dependencies, security issues and not maintained |
I agree with your worst choice with lerna. We had a couple experiments with it but ultimately did yarn workspace with custom local tooling. |
I'll add this to the agenda for the next meeting as well. |
Another problem is - changelogs, single version vs multiple versions. |
Some workarounds in husky but apparently no official solution yet: To consider as a link of: |
+1 for https://github.com/atlassian/changesets. A bit like semantic-release but with a bit more manual control over which packages are released when; very useful if you to batch changes up for chunkier releases rather than releasing with every commit. We're using yarn workspaces with our own hand-crafted 'mini lerna' to run tasks across the workspace, but we'll likely shift to https://github.com/hfour/wsrun as that includes the ability to consider a build complete when it emits a certain piece of text, which is very useful for running parallel 'watch' builds. |
So with large mono-repositories, dynamically managing which portions of build/test jobs get invoked becomes important to avoid small changes requiring 30-60+ minute builds in the PR-validation pipeline. To manage that, Bazel (https://bazel.build/) has been used, where a BUILD file was defined at each package/microservice in the monorepo, and so the dependency list in package.json would be duplicated there like this example:
where the //ts/packages/... were peer packages in the monorepo (yarn workspaces) and the others were resolved by npm install. |
First pass draft #92 |
Recommended by @helio-frota #64 (comment)
* Mono-Repository Guidance and Tooling (draft) * Added subsection for building * Add link to code consistency Recommended by @helio-frota #64 (comment) * Update docs/development/mono-repository.md Co-authored-by: Wojciech Trocki <wtrocki@redhat.com> * Miscellaneous fixes * Fix links * Add section about advanced techniques * Fix broken links * Add additional guidance based on previous meeting * Add additional guidance from comments * Update docs/development/mono-repository.md Co-authored-by: Benny Powers <bennypowers@users.noreply.github.com> * On the fly changes * Add prefix statement explaining service releasing options * Remove TODOs and place as Issues Co-authored-by: Wojciech Trocki <wtrocki@redhat.com> Co-authored-by: Benny Powers <bennypowers@users.noreply.github.com>
Having multiple packages in single repo is common problem in enterprise world.
We should be giving recommendation for that.
Solutions:
The text was updated successfully, but these errors were encountered: