Because if you're distributing Yarn in JavaScript, it means you need to have Node.js installed, which means that in order to develop Python or Go or Rust programs, you need to have Node.js installed, which doesn't make a lot of sense for our users. And then that was one extra prompt to rethink how we envisioned Yarn to be developed. So, for all those reasons and more, I have to go fast here. We felt it was time to reinvent ourselves, to try something new, to go the next way. To prepare Yarn, not only for the ten years that came, but also for the ten years that are coming now.
So, the first time we did a rewrite in 2019, we learned a bunch of things. Something went well. Some things didn't go well. And I didn't want to create a new implementation of Yarn without thinking carefully about the problem that we faced then, and how could we mitigate them now. Now, there were two main reasons why Yarn 2 had such a strong reaction from the ecosystem. The first one is that it had too many breaking changes. At the time, we felt that, oh, since we're relatively code-based, now is the right time to try to do things differently, right? Wrong. That's not the right time when you're making a rewrite. Things are already very complicated. So, if you're on top of that, you're also making breaking changes, you're reaching a critical mass of pain for your users, and they are going to resent that.
Now, the second issue is that there was way too much friction. Part of that was due to our attempt to make things as seamless as possible for our users, which is a bit ironic when you think about that. For instance, we didn't really change the binary that was installed by npm install-g-yarn. It kept being Yarn 1.x, but it meant that a lot of people were asking us, how do I install Yarn 2? It was very difficult to give them a straight answer without actually doing something that would risk breaking people using Yarn 1.x. We stayed that way for a long time, and only now are we going to be able to provide a good answer to that question. So, that was something that was very important to not get wrong this time. Now, also another thing is that in 2019, we rewrote Yarn from scratch. We rewrote even the test suite. In 2026, things are different. We are not actually rewriting entirely from scratch, because we have all our tests that we wrote in 2019 that we can reuse now, which means that it's kind of a data-driven development, because now, thanks to a test architecture that we designed well in 2019, we are able to just run the exact same test with Yarn 6, even though the implementation is completely different, even though now it's a Rust binary.
Comments