Treat Makefile warnings as errors on CI
As @gurkanindibay suggested, we could early catch the issues that has been fixed in following PRs if we had treated warnings as errors on CI:
- https://github.com/citusdata/citus/pull/6038
- https://github.com/citusdata/citus/pull/6206
(not sure if "development" is the correct label but ..)
+1 for that, PG has a specific schedule which does only compile with warnings turned into errors.
I think they have specific schedule to enable the tests run even if there is a compile warning, which makes sense to me as well
Thinking about this little more, then we would also interpret the following usual warning as an error too, which is not much desirable I think.
Makefile:61: warning: overriding recipe for target 'check'
Alternative solution could be to make use of the ignore-warning/raise-warning-as-error mechanism that we're currently using in packaging pipeline. What do you think @gurkanindibay, does that sound like something doable to you ?
Yes it is absolutely doable. We have ignore mechanism as well. So that we can ignore the unimportant ones We have it in tools repo. I can integrate it if you want However, I need to customize the script to be able to fit it for citus For reference https://github.com/citusdata/tools/blob/develop/packaging_automation/packaging_warning_handler.py
Thinking about this little more, then we would also interpret the following usual warning as an error too, which is not much desirable I think.
are Makefile warnings relevant? Even if so, it'd force us to fix? I have seen that warning for ages and never acted on. Maybe an error would have been much more different :D
I think it is desirable to have the compile warning checks on the main branch, not for packages.
I have seen that warning for ages and never acted on. Maybe an error would have been much more different :D
True :) So then we first need to understand how we can fix this to move forward with the "interpret any warning as error" approach.
To be clear, we already treat compilation warnings as errors in CI. But since we package for other (newer or older) OSes than we use in CI they sometimes give different warnings. The OpenSSL one is an example of that.
The Makefile warnings are different though. It would be good to error for those in CI too.