-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Discussion: separate repos vs monorepo #4955
Comments
I think splitting out reusable functionality and distributing it makes a lot of sense, so big +1 to that. As for how we do that, I'd also vote monorepo if we make the effort to be consistent with the ecosystem and adopt tooling that will help us with the additional burden. When a module seems to become popular and independent enough of lighthouse, then it makes sense to split it out into it's own repository where issues/PRs can be managed separately, but until that point, I think the extra burden of maintenance is too high for the sake of hypothetical other consumers. My ideal setup would be that we turn this into lerna-style monorepo and publish some of our core pieces under a @lighthouse org. Example of what it might look like below.
lerna+yarn workspaces really eases a lot of the pain of having to make changes in multiple places at once, bumping dependencies on your own modules, etc. It also make it pretty seamless to automate publishes as well which would be nice to get a lighthouse@next published fresh off master every day :D |
I think the easiest decision to make is to spin the submodule out of our repo when it will have a clear owner who maintains the project for more reasons than just as a Lighthouse dep. aXe is really great because we can hand off bugs and get pinged when we can bump the dep. The contrast is There's also the question of scope. I think having a project within Lighthouse implies that it's a part of Lighthouse that might be useful independently, not just that it's a thing that the LH team also maintains and part of it is used in LH. How much bandwidth can we spare for these projects when/if they expand beyond things that LH contributors care about? Sometimes new features are complicated and subtle, and it can take a good deal of research before even knowing if a PR is a good idea, let alone implemented well. There's also a question of complexity of implementation. Some of these things (e.g. trace parser, manifest parser, robots.txt parser?) are very bounded in scope and can basically be "finished", only adding new things if/when the specs update or bugs need to be fixed. That really lowers the bar on how often we need to open PRs against them/bump the version in LH.
|
We also don't want to overdo architecture organization for the sake of itself. I think that there are definitely productivity improvements we could make here, but LH as currently designed is pretty tightly coupled, and we make decisions all the time that adds to that. We shouldn't have our project/build infrastructure pretend otherwise or we'll just end up with impedance mismatch in the other direction :) |
I'm amenable to a monorepo approach with independent modules. That addresses my biggest concern about downstream consumers. I still find it cumbersome that anyone who wants to spin it off would need to fork the entire LH codebase. Or would that not be the case?
I guess it's similar to So I think we have consensus that we can start developing the SD validation within the LH repo in a way that enables the module to be published independently. If and when it gets big enough, we can spin it out as @brendankenny suggests. |
Groovy. SGTM. Closing this issue, but it was super valuable to record our thoughts here. Thx ya'll! |
There are a few efforts that make sense to be published independently and consumed by other projects not using the entire Lighthouse stack:
There are definite benefits for projects like these to be available independently. The primary benefit is that, availability as a standalone module increases likelihood of use by other projects, and that increases likelihood of receiving bug reports, fixes, features and maintenance.
At the same time, we've also found challenges working with separate repos:
These reasons are what leads me to favor keeping projects within the mono-repo.
However the less that we expect code changes/issues/reviews that affect LH, the more it is reasonable to live in it's own repo.
@brendankenny @patrickhulce thoughts?
@rviscomi @kdzwinel what are you thinkin?
The text was updated successfully, but these errors were encountered: