CI should fail on deprecation warnings
See original GitHub issueIt’s hard for us to detect when we are using deprecated code, which allows things like #1798 to go undetected for a long time. In dateutil
I treat all warnings as errors so that we can actually heed the warnings that are being raised by my upstream dependencies.
I think we should do the same thing here. I tried enabling warnings-as-errors on #1798 and it actually worked for a few days, then bdist_wininst
was deprecated breaking us on the dev build of CPython. I think we should remove our use of bdist_wininst
or suppress the warning then enable warnings-as-errors.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Best practice: how to make a CI pipeline fail if there are ...
Recent Ansible versions do not treat deprecation warnings as errors, so there is no obvious way to make a CI pipeline fail if...
Read more >CI linter: Extend errors messaging to include warnings - GitLab
Problem to solve As we start deprecating CI features like extending only/except in shared templates.
Read more >Failing the build on deprecation warnings - Gradle Forums
I'd like to be proactive in removing deprecation warnings so that I'm able to upgrade Gradle versions more easily.
Read more >The Complete Guide for Deprecation Warnings in Rails
If a disallowed deprecation is introduced, it will be treated as a failure and raise an exception in development and test. In production...
Read more >Treat warnings as errors except deprecations - Using Swift
Is “all deprecation warnings” the right level of granularity? · In the future there will probably be a compiler mode to compile all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I basically agree with all of that. Happy to enforce no warnings. Even better is to have a clear guidance on how to suppress errors/warnings when the emerge and to file a corresponding ticket to address the deprecation. Perhaps that guidance could go here.
I imagine something like:
Can we test a process like that with
bdist_wininst
?Enabling this feature is going to cause a lot of toil on this project. Every time a deprecation emerges, it’s going to be blocked by this feature. Case in point #2016. That’s not too bad because it means that a ticket can be filed and the error can be suppressed until the issue can be addressed (if not addressed immediately), but it’s going to require additional resources to keep up with these issues in a timely manner to prevent them from blocking otherwise good pull requests.