question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to turn backend warnings into errors?

See original GitHub issue

In https://github.com/scikit-hep/pyhf/pull/1881 I noticed and fixed a SetuptoolsDeprecationWarning that pyhf had in its setup. As pyhf runs build in its CI to ensure things are working I would like to have these warnings get turned into errors so that the dev team is alerted to them in advance (I just noticed this SetuptoolsDeprecationWarning by looking at the logs by chance).

My naive attempt at

$ python -Werror -m build .

doesn’t work, but I guess I’m unclear on how one should pass in warning filters to build and the commands that it will run as

$ python -m build --config-setting=-Werror .

also doesn’t work (though that makes sense as --config-setting is going to the backend (setuptools) and not to Python).

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
laydaycommented, Jun 14, 2022

It expects the fully-qualified module name, which in this case would be setuptools.config.setupcfg. You can filter using regexes with the programmatic API but not with -W or the env var.

1reaction
matthewfeickertcommented, Jun 14, 2022

You can filter using regexes with the programmatic API but not with -W or the env var.

Thanks @layday — this is the last bit that I was missing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning Options (Using the GNU Compiler Collection (GCC))
The specifier for a warning is appended; for example -Werror=switch turns the warnings controlled by -Wswitch into errors. This switch takes a negative...
Read more >
Error Handling from Backends to the Frontend - The New Stack
You want to start by designing your backend to handle errors as gracefully as possible, to give something for the frontend to present...
Read more >
How can I disable or hide warnings and errors shown in the ...
Is there a way to disable or hide warnings and errors shown in the backend? For example when a user creates a node...
Read more >
Hide errors and warnings from console - javascript
1. Yea, disable those messages in the console itself (There should be some filter options). · 2 · 13 · I don't know...
Read more >
backend warnings for unpublished posts - WordPress.org
You should disable showing PHP warnings and errors. That is a potential security issue for your website in case an error shows something...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found