-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Use yarn instead of npm #8621
Comments
That time drops to about 11s once the cache is populated. Not bad! |
We talked about this collectively and decided that yarn makes sense for installs, but there are a few issues that will need to be resovled:
|
|
We should also look into useing |
I thought the lock file was supposed to be enough to keep things consistent. What does checking in the tars give us, besides not having to download all that stuff every time? |
By lock file do you mean the shrinkwrap? We're currently pinning packages to specific versions in the By committing the packages, it would make it much easier and faster to switch branches. We could also go back to using package version ranges. |
I meant the
The lock files gives us the later. Would users still need to run |
It will trim 1+ minutes off of every CI build |
Compared to npm3, or compared to yarn without the checked in cache-folder? |
npm3, might not be a whole lot quicker than a warmed up yarn cache |
The one thing I can think of that it gives us is guaranteed consistency of the dependency source code. No pulled dependencies (e.g. leftpad), for example. In any case, I think we should probably treat that as a separate issue to pulling yarn in for the sake of locking. It's an additional feature we'd have at our disposal at least. |
This would protect us from packages disappearing from their source, npm or otherwise. As for consistency, I thought that the lock file gave us that as well. Isn't that what all the checksumming stuff does? Note that I'm not trying to be contrary here, I don't really have an issue checking in the cache folder. I'm genuinely curious about this stuff. |
@w33ble Yeah, you're right about consistency there. Yarn's lock file would catch a change in source code for a given version, so it can guarantee consistency in that way, but at best it can really just error when something is wrong. The cache would make us more resilient to that sort of problem by relying on the original source when we first get it set up. I'm not 100% sold on checking in the deps for what it's worth, so we're both just trying to make the situation clear. |
@spalger, we no longer use |
yarn on windows should be faster too now: yarnpkg/yarn#3234 |
I reverted this PR, so I'm reopening this. See #11637 (comment) |
Facebook just released yarn, which offers some key benefits over
npm
that aim to solve problems we're currently struggling with. Specifically:npm
registry itself for buildsWe can/would continue to use
npm
as our download registry, so if we ever had issues withyarn
, switching back tonpm
would be a minor task.The text was updated successfully, but these errors were encountered: