fancy-queen-20734
04/14/2020, 8:06 PMhundreds-father-404
04/14/2020, 8:08 PMbuild-support/bin/ci.py --lint
, which runs ./pants --tag='-nolint' lint --per-target-caching ::
--per-target-caching
results infancy-queen-20734
04/14/2020, 8:09 PM<http://ci.py|ci.py> --lint
doesn’t use a cache in that case?hundreds-father-404
04/14/2020, 8:10 PMfancy-queen-20734
04/14/2020, 8:11 PMhundreds-father-404
04/14/2020, 8:12 PM--per-target-caching
, but that results in the shard taking about 10 minutes longer on average iirc because we’re running on every single target
The better solution is the upcoming project to remove --per-target-caching
into a merged solution that gets the benefits of bothfancy-queen-20734
04/14/2020, 8:17 PM--quiet
to black in CIhundreds-father-404
04/14/2020, 8:17 PMpants.travis-ci.toml
fancy-queen-20734
04/14/2020, 8:38 PMwitty-crayon-22786
04/14/2020, 8:58 PMfancy-queen-20734
04/14/2020, 8:58 PMhundreds-father-404
04/14/2020, 8:59 PMi don’t think it makes sense to show output on success for these linters, i don’t think.My main hesitation is that Pants is now introspecting the tools and modifying the results, rather than us simply wrapping the tools. That’s an important philosophical distinction
witty-crayon-22786
04/14/2020, 8:59 PMfancy-queen-20734
04/14/2020, 9:00 PMhundreds-father-404
04/14/2020, 9:00 PMdo console rules have common options around output?No, they don’t, beyond things like
--sep
and --output-file
iirc. Also now renamed to goal rulesit doesn’t need to modify it any way. just not render it on success.Sure, tactically, we can inspect the return code and not render if successful. To do that, we need to either in
black/rules.py
mutate the FmtResult so that the stdout
attribute is empty, or we need to generalize this filtering in <http://fmt.py|fmt.py>
.
Also, when using --no-per-target-caching
, I personally quite like Black saying “ran over 71 files.” It’s helpful when I’m doing something like ./v2 --changed-since=master fmt
to know how many files I’ve changedwitty-crayon-22786
04/14/2020, 9:03 PMlint
output.hundreds-father-404
04/14/2020, 9:37 PM--verbose
option. Now we are removing the ability for the user to run with --verbose
on successful cases, which they might want to do to check which precise files Black ran over.witty-crayon-22786
04/14/2020, 9:39 PM--verbose
in many other cases is propagate pants' own log level to tools that are spawned.hundreds-father-404
04/14/2020, 9:41 PMwitty-crayon-22786
04/14/2020, 9:42 PMhundreds-father-404
04/14/2020, 9:42 PMand i don’t think the goal is to be a “simple wrapper”To clarify, I argue that right now we are simple wrappers. We don’t put any restrictions on the passthru args you can give and we also allow you to specify a config file with whatever options you want On the extreme opposite, we don’t allow config files or passthrough args. Everything is a Pants option
witty-crayon-22786
04/14/2020, 9:49 PMhundreds-father-404
04/14/2020, 9:51 PMi think that’s a false dichotomy. i’m not suggesting adjusting which options are legal.We arguably would need some level of validating args, though, if we do this. It likely no longer makes sense to allow users to specify
--black-args='--verbose'
and --black-args='--quiet'
if Pants is already doing its own thing with output.
I’m not saying we should absolutely avoid this, only that I think we need to be really careful to open the door.witty-crayon-22786
04/14/2020, 9:59 PMhundreds-father-404
04/14/2020, 10:00 PMwitty-crayon-22786
04/14/2020, 10:02 PMhundreds-father-404
04/14/2020, 10:03 PMfmt
and lint
which I’ve been working on for 3 days and want to avoid merge conflicts)witty-crayon-22786
04/14/2020, 10:04 PMhundreds-father-404
04/14/2020, 10:05 PMwitty-crayon-22786
04/14/2020, 10:06 PMhappy-kitchen-89482
04/14/2020, 10:44 PMfancy-queen-20734
04/14/2020, 10:44 PMhappy-kitchen-89482
04/14/2020, 10:44 PMfancy-queen-20734
04/14/2020, 10:44 PMhundreds-father-404
04/14/2020, 10:46 PMFmtResult
and LintResult
for the name of the tool, e.g. "black"
vs. "flake8"
. Then, we could add that to the output as a bannerfancy-queen-20734
04/14/2020, 10:49 PMwitty-crayon-22786
04/14/2020, 10:50 PMfancy-queen-20734
04/14/2020, 10:51 PMhundreds-father-404
04/14/2020, 10:54 PMBecause we’re currently not rendering output until the end either.I’d love to change that, but how is that possible? We’re using
await MultiGet
and we can’t do anything with the results until it’s all done. I suppose the coordinator
rule pattern?witty-crayon-22786
04/14/2020, 10:56 PM