3 ms·
I agree with the spirit of this article: -Werror is a very good thing and should be on in any serious codebase. But the rebuttals for the cons are pretty weak.
by ludocode 5y ago
I agree with the spirit of this article: -Werror is a very good thing and should be on in any serious codebase. But the rebuttals for the cons are pretty weak.
For Con #3, "make I=0" flag is cute, but the final "make" doesn't actually work. Any files that had warnings but still compiled successfully will not get recompiled. The simplest workaround is to "make clean" first but this can be time consuming (ccache helps.) Another workaround is a script that touches any unclean or just-committed git files but this is error-prone. It's possible to have "make" rebuild any files that were built with I=0 but it adds a lot more Makefile complexity. And in any case all of these are manual workarounds that are easy to forget.
For Con #4, a docker image doesn't help you build for Windows or macOS. You need full VMs to test on them (and a macOS VM violates the license, so technically you need a full Mac somewhere you can SSH into.) This process can be optimized pretty well but it's still another manual step.