3 ms·
I’m guessing you haven’t been in a situation where the problems are apparent? Your advice probably works fine for small projects. You can upgrade the toolchain
by skybrian 3y ago
I’m guessing you haven’t been in a situation where the problems are apparent? Your advice probably works fine for small projects. You can upgrade the toolchain and fix all the new warnings in the same commit. Often there’s nothing to do.
It doesn’t work for a monorepo where the toolchain needs to be upgraded for many projects at once. Enabling each new warning (turning it into a build-breaking error) may require touching hundreds of files. Getting a toolchain upgrade done in one monster commit doesn’t work; you will inevitably break something and have to roll back, or be unable to commit it all due to merge conflicts with other commits.
I’ve been on a team that needed to be able to upgrade the toolchain in one commit and then turn on each new warning in separate commits. Having an explicit list of all the warnings that are turned on and then gradually updating it to be the equivalent of -Wall was the way to go.
- kstenerud 3y agoYes, I've done that too. The point is, you do it. werror stays on and you just deal with the migrations because you care about your code quality. werror is your friend.