by invaliduser · 8y ago · 0 comments
The code share between IOS and Android is very high, almost 100% (except a few simple home-made native components), and we are above the 85% of shared code between the mobile and desktop versions (mobile is RN, desktop is react-native-web + rewriting of several components on a Qt WebEngine with native versions of a few RN components rewritten in C++). The C++ part is actually very simple, and under 2Kloc. Note that we use Typescript everywhere on the React side, and we consider it very valuable.
Overall, everything works great, we have a few performance issues here and there, but nothing we can't deal with. However the biggest flaw is how indigent the build system is (combining all the flaws of npm and the issues of android upgrades), we still do not manage to have reproducible builds, and it's been sometimes very painful to fix an issue a few weeks later because it would just not build and require a few hours to make it build again.
Can you not use yarn?
Granted this is oftentimes because our dependencies float a bit, especially since we've been migrating to a new major version of one of our major dependencies, but it's still usually the quickest way to fix weird dependency issues.
For us, npm tends to be really wonky in a CI environment. Partially because our CI container needs updating, but also because `npm install` doesn't actually do what you think it does. Gotta use `npm ci`. But the npm in our CI container is old enough that it doesn't actually support that command (yeah yeah, I know -- I don't have access to that part of our build process).
As of npm 6 though, the differences between yarn and npm have been whittled away considerably. Really, the biggest reason we use yarn is because we also use React and a number of other libraries that come from Facebook, so we're just staying under the same umbrella. We don't expect Facebook to break their own tooling, basically, while npm has indeed broken a few things for us in the past, many times critical things.
Not the most compelling of reasons to be sure, but that's why.