Closed cbarrete closed 4 months ago
I misdiagnosed this one, Level X
is always in the output, so the correct approach is to use one of the JSON output flags and parse that instead.
It would be nice to have a way to dump just the targets to stdout, but it's workable for now.
Yep, I would encourage anyone who wants to consume the output to use the JSON - sooner or later the distance tends to come into play and I don't want people parsing that from stdout. But I'm not averse to a --quiet option which just prints the targets that have changed and no levels or anything.
When a change causes no targets to require a rebuild, the output of
btd
is not a valid list of targets:where
Level 0
is written tostdout
and the rest tostderr
. This is a (minor) inconvenience because we cannot directly pass that output tobuck2 build
/buck2 test
as suggested in the README. Is this expected behavior? If so, can we expect that output to be stable (because right now I explicitly check againstLevel 0
to check if targets need to be run or not, which seems fragile)?