CI: Cmake warnings should be errors #31476

issue maflcko openend this issue on December 12, 2024
  1. maflcko commented at 8:30 am on December 12, 2024: member

    It is brittle to silently ignore Cmake warnings in the CI.

    They should be turned into errors.

    This will uncover an issue in the centos task that the correct python version is missing. I guess this should be fixed by installing and activating an acceptable python version.

  2. maflcko added the label Build system on Dec 12, 2024
  3. maflcko added the label CI failed on Dec 12, 2024
  4. fanquake added this to the milestone 29.0 on Dec 12, 2024
  5. fanquake referenced this in commit 78f1bff709 on Dec 13, 2024
  6. hebasto commented at 11:47 am on December 13, 2024: member

    It is brittle to silently ignore Cmake warnings in the CI.

    They should be turned into errors.

    When building with Berkeley DB > 4.8, this warning will be always emitted: https://github.com/bitcoin/bitcoin/blob/78f1bff7099b854bb71e57d0307b8c21a1ac32c5/CMakeLists.txt#L107-L109

  7. maflcko commented at 11:57 am on December 13, 2024: member

    I guess I was mostly thinking about configure_warnings.

    An alternative would be to require python to be disabled explicitly. Otherwise, it seems odd that every setting in cmake has a static default that can only be overridden explicitly, except for some, which are silently downgraded?

  8. maflcko commented at 1:06 pm on January 2, 2025: member

    This will uncover an issue in the centos task that the correct python version is missing. I guess this should be fixed by installing and activating an acceptable python version.

    Fixed in https://github.com/bitcoin/bitcoin/pull/31593

  9. fanquake referenced this in commit eb243ff06c on Jan 20, 2025
  10. Sjors commented at 9:33 am on March 7, 2025: member

    This doesn’t seem release blocking to me.

    The only open PR that points to this issue is #31665 which isn’t marked for v29.

  11. achow101 removed this from the milestone 29.0 on Mar 7, 2025
  12. davidgumberg commented at 6:15 pm on May 6, 2025: contributor
    Is it possible that instead it is the case that we have some warnings which should in fact be errors? For example, having a python version below minimum?
  13. maflcko commented at 6:41 pm on May 6, 2025: member

    Is it possible that instead it is the case that we have some warnings which should in fact be errors? For example, having a python version below minimum?

    I think this was implemented in #31669, but for some reason it was closed.

  14. glozow referenced this in commit 6e5b67a370 on Jun 30, 2025
  15. fanquake referenced this in commit 83ae7802fe on Jul 10, 2025
  16. purpleKarrot commented at 3:24 pm on September 3, 2025: contributor

    It is brittle to silently ignore Cmake warnings in the CI.

    I think the desire to turn warnings into errors on CI (both configure warnings and build warnings) is due to the fact that CI does not perform any analysis of the build output. If the build result was displayed on a dashboard, you would not want to turn warnings into errors, because it would take away useful statistics. Turning warnings into errors is the wrong approach. Consider how the following information would look like with warnings turned into errors.

    0configure warnings: 3
    1configure errors: 0
    2build warnings: 14
    3build errors: 2
    4tests failed: 10
    5tests passed: 2342
    6tests skipped: 27
    
  17. maflcko commented at 3:28 pm on September 3, 2025: member

    Turning warnings into errors is the wrong approach.

    The thinking behind this is that all warnings should be addressed in one way or another, otherwise there wouldn’t be something to warn about.

    One way to achieve this is by turning warnings into errors and then addressing the errors.

    As for errors: It is not possible for errors to exist, because pull requests will not be merged when errors exist in the CI.

  18. purpleKarrot commented at 4:00 pm on September 3, 2025: contributor

    It is not possible for errors to exist, because pull requests will not be merged when errors exist in the CI.

    This is just a matter of configuration. The same mechanism that prevents merging when errors exist could be used to prevent merging when warnings exist.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-09-12 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me