Skip to content

Conversation

@EwoutH
Copy link
Member

@EwoutH EwoutH commented Dec 4, 2025

Summary

Configure CI to treat all warnings as errors (except PendingDeprecationWarning) to prevent warning accumulation and enforce immediate fixes.

Motive

Mesa recently had 1,514 warnings across 366 tests, creating technical debt and degrading developer experience. While significant cleanup has reduced this to ~22 warnings, we need to prevent regression.

Without enforcement, warnings slowly accumulate as contributors add code that triggers new warnings. By the time someone notices, hundreds of warnings have built up, making cleanup overwhelming. Treating warnings as errors catches issues immediately at PR time when they're easiest to fix.

Implementation

Added -Werror -Wdefault::PendingDeprecationWarning flags to pytest in both CI jobs:

  • -Werror: Converts all warnings to errors, failing the build
  • -Wdefault::PendingDeprecationWarning: Exempts PendingDeprecationWarning, as listed in our deprecation policy.

This means DeprecationWarning, FutureWarning, UserWarning, and RuntimeWarning will now fail CI, forcing contributors to fix them before merging.

Simplified the examples job configuration to match the main build job for consistency.

Configure pytest to fail CI on any warnings except PendingDeprecationWarning.
This prevents the codebase from accumulating warnings like the 1500+ we
recently had to clean up.

- Add -Werror flag to pytest in both build and examples jobs
- Add -Wdefault::PendingDeprecationWarning to keep these as warnings
- Simplify examples job warning configuration for consistency
@EwoutH EwoutH requested a review from quaquel December 4, 2025 20:47
@EwoutH EwoutH added the ci Release notes label label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant