Skip to content
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

Move from Lerna to alternative toolset (like Nx) #7333

Open
2 tasks done
seyoon20087 opened this issue May 5, 2022 · 14 comments · May be fixed by #8573
Open
2 tasks done

Move from Lerna to alternative toolset (like Nx) #7333

seyoon20087 opened this issue May 5, 2022 · 14 comments · May be fixed by #8573
Labels
better engineering Not a bug or feature request domain: dependencies Proposal to upgrade a dependency across major versions meta Meta-issue about the project itself. Either project maintenance or a list of other issues. status: needs more information There is not enough information to take action on the issue.

Comments

@seyoon20087
Copy link
Contributor

seyoon20087 commented May 5, 2022

Have you read the Contributing Guidelines on issues?

Motivation

Lerna is not maintained anymore. As a result, you may want to switch to an alternative solution (such as Nx).

Self-service

  • I'd be willing to do some initial work on this proposal myself.
@seyoon20087 seyoon20087 added proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels May 5, 2022
@Josh-Cena Josh-Cena added domain: dependencies Proposal to upgrade a dependency across major versions and removed status: needs triage This issue has not been triaged by maintainers labels May 5, 2022
@Josh-Cena
Copy link
Collaborator

Josh-Cena commented May 5, 2022

Agree 👍 I've also talked to @slorber about this on Discord. My main candidate for now is monodeploy, because we are also migrating to Yarn v3 in #6028. cc @RDIL in case you want to make the DX fully prepared in that PR. The publishing process needs investigation.

We'll see if Nx is necessary after we've made the migration to Yarn v3.

@slorber
Copy link
Collaborator

slorber commented May 5, 2022

We also have good feedback about using Turborepo from @yangshun

Please don't submit any PR on this for now, we'll figure out the setup we want to adopt

For the time being, our Lerna setup still works

@Josh-Cena
Copy link
Collaborator

For me, the choice is either monodeploy (works best with Yarn v3 workspaces), or Nx (I work on several other projects that use it with great success). I'm open to try Turborepo, but I'll need some comparisons.

@Josh-Cena Josh-Cena added better engineering Not a bug or feature request meta Meta-issue about the project itself. Either project maintenance or a list of other issues. and removed proposal This issue is a proposal, usually non-trivial change labels May 5, 2022
@Josh-Cena
Copy link
Collaborator

lerna/lerna#3121 Large thonk

@yangshun
Copy link
Contributor

yangshun commented May 6, 2022

If we move to Vercel hosting then using Turborepo would be a no-brainer.

@Josh-Cena
Copy link
Collaborator

Does Vercel hosting offer special integration with TR? If that, I'm very interested in seeing a working example 😄

@yangshun
Copy link
Contributor

yangshun commented May 6, 2022

Yes, they have remote caching, but I'm not sure whether it's free or a paid feature.

@Josh-Cena
Copy link
Collaborator

A great amount of our CI time (in PR) is spent on building packages. If we can cut that down (through persisting some cache), we can greatly speed up the deploy preview. Looking forward to any solution.

@slorber
Copy link
Collaborator

slorber commented May 25, 2022

Afaik Meta is already using Vercel for many sites (like the new Beta site) and maybe not using Nx cloud already.

I'd rather ask @zpao what is possible for us to use there before choosing the definitive tool.

Having caching would be very nice for sure.

Lerna still works and is not maintained again, so there's no need to hurry

@Josh-Cena
Copy link
Collaborator

Lerna 5.0 has just been released, with a lot of dependency upgrades! This makes me hate it a lot less.

@pavankjadda
Copy link

Lerna 5.0 has just been released, with a lot of dependency upgrades! This makes me hate it a lot less.

It seems Lerna 5.1.x is way faster than TR (5.3 times). Quoting Victor tweet

🎉 Lerna now supports:

  • distributed caching
  • tasks pipelines (e.g., tests can depend on builds)
  • distributed task execution

It's super fast 🚀

➡️ Lerna is 5.3 times faster than Turborepo!

Blog: link

@Josh-Cena
Copy link
Collaborator

I'm not even sure if we need to do anything at this stage, since I don't know if it's Lerna or tsc being slow, but I'd still like to play with different managers just to confirm. I'd definitely try out 5.1 in this weekend's dependency upgrade.

@Josh-Cena Josh-Cena added the status: needs more information There is not enough information to take action on the issue. label Jun 23, 2022
@RDIL
Copy link
Contributor

RDIL commented Jun 23, 2022

@Josh-Cena usually the performance boils down to:

  • TypeScript's type checking portion is always on, and the more types it finds (so essentially every type def in node modules), the slower it is.
  • Lerna is mostly just Git subprocess operations or startup, both of which are a bit slow.

@maverictopgun72

This comment was marked as spam.

@slorber slorber linked a pull request Sep 20, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better engineering Not a bug or feature request domain: dependencies Proposal to upgrade a dependency across major versions meta Meta-issue about the project itself. Either project maintenance or a list of other issues. status: needs more information There is not enough information to take action on the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants