Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you ship a public project and do not have fixed toolchain versions, remember to only use -Werror for CI and debug builds: you do not want people building your project to fail with an error at first try.


I know this is a thing, and I've been frustrated by this in the past. But I think it's a little more nuanced than "don't use -Werror in distribution". Warnings are warnings for a reason, and sometimes that reason is "this could be a security/data corruption problem, but we can't be sure enough to make it an error". Maybe it's better that code can't be compiled in that case. I mean, the reason -Werror is annoying is that it's very hard to ignore. Maybe the best case scenario is for a builder to point out the failure to the maintainer, or maybe the worst case scenario is everyone down the chain ignores the warnings from a lack of -Werror and bad things happen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: