3 ms·
Absolutely not the fault of Werror. Werror is fine and a great idea. Your complaint here is crappy build systems where you can't easily adjust flags. Yeah that'
by harry8 8y ago
Absolutely not the fault of Werror. Werror is fine and a great idea. Your complaint here is crappy build systems where you can't easily adjust flags. Yeah that's garbage and so normal we sometimes accept it without thinking how utterly rubbish it is. But it's sure not Werror at fault of you update things and have trouble working out how to do something basic and trivial with the build system.
Werror forever. Don't do crappy build systems so you can do sensible things like enabling Werror.
- mort96 8y agoI'm not sorry, but using a build system which makes it easy to disable -Werror doesn't help. It's still somehing everyone who wants to use your program has to figure out how to do, and if you're actually using an obscure build system (which it sounds like you're suggesting), then that's even more annoying. If everyone on the planet used one build system which had a singular way to disable -Werror you'd have a point, but that's not exactly going to happen. It's not that it's usually _hard_ to figure out how to disable -Werror. In a correctly written Makefile, it's literally just `make CFLAGS=-Wno-error`. It's about having to figure it out at all. Don't make life annoying for every one of your users just because you're too lazy to set up your project such that builds used while developing (such as debug builds) use -Werror, while regular builds don't. If you absolutely need every build to use -Werror, then please, just include your build system's version of `CFLAGS=-Wno-error` in your readme's compile instructions (even when using make; `CFLAGS=-Wno-error` works for _correctly written_ makefiles, which most makefiles are not.)
- harry8 8y agoYou've got build system Stockholm syndrome! :-) Changing a flag because you've changed compiler (or any other reason) should take no thought in the 5 seconds it takes. Any flag change. The end.
- mort96 8y agoBut... this isn't about my own code using my preferred build system. Of course you can quickly change any flag if you know the build system works and hiw your project uses it. It will not take 5 seconds with no though to figure out how a build system you have never used before lets you change build flags. Besides, even if it did take just 5 seconds and no thought, I wouldn't know it's necessary before I've tried to compile, maybe noticed that it will take a while because it's a big project, gone away and done something else for a bit, and returned to a failed build because one file a couple of minutes in had an unnecessary set of parentheses somewhere. I absolutely don't understand what stockholm syndrome has to do with anything. I haven't advocated for any particular build system.
- harry8 8y agoIf you can change build systems flags easily, without thought, very quickly. Do you still think Werror is a bad idea? Assuming your answer to that is the same as mine. If you always have a build system where you can change flags easily, without thought very quickly, you do use Werror. We frequently (always?) don't have such a build system and we're used to that. We're prisoners of it. It sucks. C build systems are utterly terrible. We're captured by them. Whether it's autotools, cmake, scons, a bajillion make files used directly or whatever. I think acknowledging it is reasonable. I think claiming they are other than terrible is stockholm syndrome. (Note that they may not be capable of being improved, there may be nothing better, etc etc. - I make no claims about it). Not using a flag because it makes life hard when the compiler is upgraded and the flag needs to be changed is a build system issue. Really.