Hi folks. When I run `pants lint ::` it throws a b...
# general
h
Hi folks. When I run
pants lint ::
it throws a bunch of warnings, all right. However, when I re-run it, I suppose the warnings aren't shown anymore because of caching. However, it would be good if the output were shown, regardless of whether it is cached. That makes it easier to resolve warnings. Or is there another trick to show warning caching regardless?
w
I vaguely recall looking into this. I think I messed around with adding warning logging
-lwarn
and stuff, but it could just be that memoized/cached results aren't flowing through the code necessary to show the warning again. A lot of the warnings that pop up have extra configuration to set warning/error/ignore on them specifically, so that could be an approach. I think you can also run with ``--no-pantsd`` if you want to see those errors pop up, but with slower runtimes
h
Running with warnings-as-failures would do the trick, if the underlying tool supports it
w
I've never seen that
Or, is that an actual flag? Or the more generic - errors
e
Seems there are two distinct situations: 1. tools (eg linters) that have warnings when running against your code 2. pants warnings themselves (eg. from unmatched globs in
sources
Both situations do not (by default) show warnings from cached results, but the tricks to get the warnings to display are probably different per situation
w
h
We usually allow passing config through to the underlying tool, and some tools have “treat warnings as errors”
Hacky, but
h
I mostly want that two runs of pants on identical code yield the same warnings output.
I understand this might not be trivial.