https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-cat-90827

08/12/2022, 3:03 PM
I think I’ve seen it somewhere where that it’s possible to treat Pants warnings as errors, but can’t find the global option anywhere in the doc? 😕
👀 1
Copy code
11:31:27.89 [WARN] The target tests/test_lint_requirements.py:../tests imports `pkg_resources`, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['requirements:requirements-ci#setuptools', '//:reqs#setuptools'].
an example of warning I’d like to break the build 🙂
I know about
files_not_found_behavior
and
owners_not_found_behavior
, but they don’t cover this case
h

happy-kitchen-89482

08/12/2022, 3:06 PM
I don’t know of a way to do that actually!
🤔 1
b

bitter-ability-32190

08/12/2022, 3:06 PM
unowned_dependency_behavior
?
f

fresh-cat-90827

08/12/2022, 3:07 PM
why do I have this that I saw something like
--warnings-as-errors
or something, what’s wrong with me 😄
b

bitter-river-56089

08/12/2022, 3:16 PM
It is a common option in a lot of tooling. I honestly thought I remembered seeing it as a pants option as well. Would be nice to have, especially for these types of warnings!
h

happy-kitchen-89482

08/12/2022, 3:49 PM
If we had such an option, would you still want them logged as WARN but for Pants to exit, or would you expect them to be logged as ERROR ?
3 Views