I wonder if it would be helpful for `./pants goals...
# general
h
I wonder if it would be helpful for
./pants goals
to print the source file where that goal is implemented (maybe with a special
--debug
flag?)
👍 2
h
Good idea. This would entail adding
logging
to the python file and then calling
logging.debug
. You can look at
python_test_runner.py
as an example. You’d turn it on via
-ldebug
when running Pants
h
is
-ldebug
a flag that already exists?
hm, looks like
python_test_runner.py
doesn't have the string "logging" in it
h
Oh wait not that one. I think it’s test? Afk. It’s under core rules I think
Yes,
-ldebug
exists. Go to
global_options.py
. It’s short for
—level
iirc
h
what is the
active
flag on a goal used for right now? I wonder if it makes sense for v2 goals to only have that flag set if the
--v2
flag is passed in (and similar for v1 goals with
--no-v1
)
a
these are all really good ideas
the v2 rule interface is really really open right now and i encourage you (because this is what i do) to implement these ideas when feasible and just toss up a PR because it means we can keep changes small and we can iterate
(i really, really want to work on
--query
soon, and will immediately once i finish this other thing, ugh)
❤️ 1
but basically there aren't a ton of people who can definitively answer these questions so sometimes i have found it easier to barge on ahead and risk closing a PR because it didn't end up being necessary (like https://github.com/pantsbuild/pants/pull/8046, which i'm going to close or remove most of)