<#18591 Expose in `peek` which goals are associate...
# github-notifications
q
#18591 Expose in `peek` which goals are associated with a target Issue created by sureshjoshi This was a conversation in Slack, but the long and short of it is that there isn't really a "good" way to say "find all targets that are `test`able" or "list all `package`able targets". This functionality is used by the Pants engine and can be unreliably logged to the console, but this would be nice to have as a first party command of some sort (part of
peek
, a
list
filter, a new goal shudder). Example as a filter:
pants --filter-goal-type=test list ::
Alternatively, maybe this functionality should be part of a BSP? Unsure. ### Example of logging to the console: oss/pants-plugins % pants list package 141346.36 [INFO] Initialization options changed: reinitializing scheduler... 141347.06 [INFO] Scheduler initialized. 141347.09 [WARN] No targets were matched in goal
list
. 141347.09 [WARN] No files or targets specified. The
package
goal works with these target types: * archive * pex_binary * pyoxidizer_binary * python_distribution Please specify relevant file and/or target arguments. Run
pants --filter-target-type=archive,pex_binary,pyoxidizer_binary,python_distribution list ::
to find all applicable targets in your project, or run
pants --filter-target-type=archive,pex_binary,pyoxidizer_binary,python_distribution filedeps ::
to find all applicable files. ⏺️ oss/pants-plugins % pants list :: pants-plugins/experimental/swift/util_rules:util_rules ... ... ... pants-plugins/experimental/swift/util_rules/compile.py ⏺️ oss/pants-plugins % pants list package 141402.99 [WARN] No targets were matched in goal
list
. Note that the second call to
list package
doesn't show the same warning as the first call. pantsbuild/pants