-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Migrate away from yarn v1 #13948
Comments
Related issue: #11924 |
During the past few years, we've been using |
@msujew why not a newer version of yarn? |
@tsmaeder, I tested the latest version of yarn (v4) and it seems to fix most of the annoying known bugs of yarn v1. It looks like a good alternative to yarn v1. However, there might be a risk when it comes to yarn maintenance. Maybe in the future, new bugs will be discovered in yarn v4 which won't be tackled by the maintainers. Maybe yarn v4 will be abandoned just as the previous versions. |
One point in favor would be the build-in scripting. We have trouble with that when building on Windows. |
Also: if we got with yarn 4, we'd have to check whether the dash-licenses tool can read the package.json format. But whatever we choose, I don't expect the migration to take more than a day or so. Basically, we have to replace all the My vote would be to got with npm because of the lower organizational risk. If we decide it's rubbish, we can quite easily switch again. |
To expand on the original post, these are some of the issues we encountered when working on larger code bases:
|
Not an expert in build tools, but pnpm is also gaining a lot of traction thanks to faster build times. To the point that it has taken over the lead as the most used monorepo tool according to the State of JavaScript 2023 Survey. Maybe worth having a look. And also VS Code has switched from yarn to npm:
|
Started working on this and it turns out the switch to npm is not simple: npm/cli#3034 Basically, npm does not topologically sort packages in a workspace before running "install" on them. I tend to think this is a killer criterion right there for a project with tens of packages which depend on each other. |
VS Code is not really a good example for us as it is not modular like Theia: they do not publish the various parts of their source code as npm modules to be used or left out by adopters. |
Why this is important: when a theia-package depends on @theia/cli in it's |
However I can very well imagine that we need to adapt our build system a bit and maybe switch away from a "simple" Switching to Overall I don't have hard feelings here and would welcome both, a change to either We could also consider a smaller scale transition first and evaluate using |
@msujew IIRC, you wanted to comment here |
Fixes eclipse-theia#13948 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <[email protected]>
Fixes eclipse-theia#13948 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <[email protected]>
Fixes eclipse-theia#13948 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <[email protected]>
Fixes eclipse-theia#13948 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <[email protected]>
At the moment we're using
yarn
v1 for package management in Theia's mono repository.Yarn
v1 is quite old and has a lot of known bugs. Even theyarn
maintainers themselves advocate switching to the latest versions ofyarn
(v3 and/or v4) which uses different package management concepts by default. Since the introduction ofyarn
, the default Node package managernpm
caught up in features and stability and is generally preferred. However there are also alternatives likepnpm
which again uses a different package management concept.It should be evaluated which package manager is the new best fit for Theia. Criteria are at least popularity, maturity, feature set, outlook in the future and migration effort for the Theia repositories and potentially downstream consumers. The choice should be validated with a POC before a final decision is made.
The text was updated successfully, but these errors were encountered: