[openstreetmap/openstreetmap-website] Upgrade to Yarn v3 (PR #3515)

Andy Allan notifications at github.com
Wed Apr 27 13:10:39 UTC 2022


@tiziodcaio Thanks for all your work so far on this. However, I'm going to put this upgrade on hold for now, and close this PR, since the upgrade currently causes more problems than it fixes.

* We should wait until dependabot supports yarn 2/3. We use dependabot on this project for the ruby side of things, and we're familiar with it from other projects too. Also given the linked issue has Github staff say they are working on it, then we should wait rather than either disabling it or moving to another provider.
* The ignore-engines flag (or rather, the fact that yarn 2/3 doesn't support node engine restrictions) is a bit of a red flag for me that yarn 2/3 isn't mature. If we need to add plugins to yarn (e.g. yarn-plugin-engines) then that's extra complexity since yarn 1 provides the same functionality built-in.
* I think the approach of "install npm to install corepack to install yarn to install the packages" is both a) the right approach and also b) a complete mess. As I said before, we should wait either until we are using a version of node that has corepack built-in (debian/ubuntu packaging caveats apply), or until there's a stronger reason to go down this route. Node is a small part of what we deal with and so all this installation complexity is bad. I want our project-wide installation to be as easy as possible for our contributors, very few of whom are dealing with anything node-related.
* We have no need to move away from yarn 1 yet.
* There is no compelling reason to move to yarn 2/3 yet.

There's other things I noticed in reviewing this PR, but I'm not asking for them to be fixed now given my comments above:

* There is a `nodeLinker: node-modules` configuration, but the github actions caching has all been changed so `node_modules` won't get cached. That should be resolved.
* There is a change to the eslint version, but that's not explained.
* The multi-platform installation notes (INSTALL.md) and the vagrant provisioning script (script/vagrant/setup/provision.sh) also need to be aligned with all these installation changes.

As I said at the top, thank you for your work on this, and I think it will come in useful in the future when the situation changes.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3515#issuecomment-1110981817
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3515/c1110981817 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220427/a6c49743/attachment-0001.htm>


More information about the rails-dev mailing list