eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.47k stars 2.46k forks source link

replace `lerna` (with `Nx`?) #12422

Open paul-marechal opened 1 year ago

paul-marechal commented 1 year ago
  1. Lerna was about to go unmaintained but recently changed maintainers and now it keeps prompting "powered by Nx" in the terminal
  2. There's an issue with how lerna runs lifecycle scripts which makes the release more complex than necessary because we have to work around it.

We're having issues with core's version lifecycle script: Lerna's documentation says this is called after the version bump and before the post-bump commit (see [1] and [2]) but the commit doesn't contain the changes made by the lifecycle script. This means we need to add an extra commit to include those changes and then fix tagging manually to try and make things as consistent as possible.

I don't know what to replace lerna with. Maybe Nx?

tortmayr commented 1 year ago

I guess migrating to nx would be the most obvious choice. Eversince nx took over stewardship of lerna it uses nx under the hood anyways (unless you explicitly set "useNx" to false in the lerna config).

If we encounter troubles with lerna the most straight forward solution is to simple drop it and use nx directly. This would also open up access to powerfull nx features like caching of task results and only executing tasks that are affected by the change.

tortmayr commented 1 year ago

AFAIK it`s also possible to use nx tasks in combination with lerna. So if we choose to not move away from lerna for now we probably still work around the issues by just migrating versioning and publish steps to nx tasks.