-
Notifications
You must be signed in to change notification settings - Fork 215
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
eventually move to Yarn 2+ (currently 4) #451
Comments
I think we can specify the version of yarn to use by entering ( Also here's a very informative blog post on what's new in Yarn 2: https://dev.to/arcanis/introducing-yarn-2-4eh1 |
Hm, I did that, and the two files it added were Cc @jfparadis @michaelfig in case you've got some ideas |
Hrm, reading https://legacy.yarnpkg.com/en/docs/cli/policies it seems like this is the intended behavior (and they don't find it to be a big deal). If that seems reasonable to everyone else, I'll make a PR for it. |
Sounds good to me |
Following the recommendations at https://legacy.yarnpkg.com/en/docs/cli/policies , I ran `yarn policies set-version 1`, which added a copy of the now-current 1.21.1 to `.yarn/` and added a `.yarnrc` to use it. I believe no matter what version of Yarn you have installed locally, when you run `yarn COMMAND`, your yarn will delegate everything to this yarn-1.21.1 . Now that yarn-2 has been released, we'll need this pinning to keep things working even when developers have yarn-2 installed on their machines. refs #451
Following the recommendations at https://legacy.yarnpkg.com/en/docs/cli/policies , I ran `yarn policies set-version 1`, which added a copy of the now-current 1.21.1 to `.yarn/` and added a `.yarnrc` to use it. I believe no matter what version of Yarn you have installed locally, when you run `yarn COMMAND`, your yarn will delegate everything to this yarn-1.21.1 . Now that yarn-2 has been released, we'll need this pinning to keep things working even when developers have yarn-2 installed on their machines. refs #451
Ok, we're pinned to yarn-1.21.1 now. I'll rename the ticket to reflect a low-priority goal to move to Yarn 2 once it's stable and ready. |
https://yarnpkg.com/getting-started/migration/ has notes on how one might make this transition. |
@turadg , I bemoaned the fact that
Help me find docs on the build performance optimizations in yarn 2+, please? |
Cached is the most common case. The doc you linked to shows 14s vs 29s for 2.0-rc.27 vs v1 (whatever version was ~4 yrs ago). For more recent data: https://yarnpkg.com/features/performances
Correct. Are you also asking for confirmation of that? Check out #8461 (in a new directory avoid borking your current node_modules) and run Then to see what it's like changing between branches, bump a dep. E.g. "typescript" to 5.3.3 in the root package.json. With v3 it completes in ~1s:
Whereas with v1 (master) it takes ~7s:
There are other advantages upgrading to v2+:
|
I'm trying to understand how yarn 2 is supposed to help with build performance. I thought you might have a quick pointer to docs on how yarn 2 uses something like
OK, so this is about But I'm also concerned about
yeah; what's necessary in that case is a mystery to me...
A step that takes 1s is easier than thinking.
thanks for all the info. |
Not much. It does add the ability to run a task only in workspaces in topological order and/or only that have changed since some ref. However that won't be new to the repo as Lerna does that now. What it could mean is getting off Lerna if we can get back with yarn+changesets. |
refs: #451 refs: #9209 ## Description We need agoric-sdk's integration tests to work with Endo running Yarn 4. #9285 tested against endojs/endo#2222. This PR is to land the necessary changes in master so the Endo PR can land without breaking SDK CI. This helps with #9209 and is a subset of #9286 , all that we need for Endo right now. ### Security Considerations none ### Scaling Considerations none, build time ### Documentation Considerations Nothing for SDK ### Testing Considerations CI ### Upgrade Considerations n/a
closes: #2245 refs: Agoric/agoric-sdk#451 refs: Agoric/ui-kit#105 ## Description Move from Yarn 1 to Yarn 4. Some advantages, - actively maintained - [workspace protocol](https://yarnpkg.com/protocol/workspace) (so we don't have to maintain version numbers in all deps) - [patch protocol](https://yarnpkg.com/protocol/patch) (so we don't need patch-package) - [constraints](https://yarnpkg.com/features/constraints) (e.g. to enforce layering) - path to adopt pnpm-style linker (without changing the UI) (see #1722 ) However this defers workspace protocol until the publishing workflow can support it. ### Security Considerations This does a bulk update of `yarn.lock`. It was automated by Yarn 4. ### Scaling Considerations n/a ### Documentation Considerations I reviewed `yarn` commands in *.md and I think they're all accurate. ### Testing Considerations This could interact with the publishing pipeline. @kriskowal may want to push a draft before we merge. If problems are found, depending on the severity, we could follow up in a separate PR to land this sooner reduce merge conflicts. This was failing on the Windows tests, something about corepack not taking effect. I don't know whether Windows is officially supported by Endo. We've since disabled them. #2243 is the issue restore. ### Compatibility Considerations Some CLI commands are slightly different. We are adopting it across the org so we have to adjust sometime. ### Upgrade Considerations n/a
@katelynsills and @btulloh noticed that the Yarn docs encourage folks to install Yarn 2, but this tree only works with Yarn 1. A quick survey showed that many (all?) of us have Yarn 1 installed locally, so we haven't noticed the problem before.
Ideally our tree should work with both versions. Fallback position is to work with Yarn 2 and make sure the docs point people at installing it rather than yarn 1 (with a stretch goal of somehow detecting when you're using yarn 1 and printing a useful error message).
The text was updated successfully, but these errors were encountered: