best-midnight-81002
08/16/2024, 2:03 AMpants package ::
-- there are many package-able target types and I don't know them all ahead of timebest-midnight-81002
08/16/2024, 2:09 AMwide-midnight-78598
08/16/2024, 2:44 AM% pants peek ::
...
{
"address": "pants-plugins/experimental/swift/util_rules/compile.py",
...
"goals": [
"run"
],
Now, I could have sworn I wrote this while seeing the functionality you asked for. Specifically dealing with the filter
https://www.pantsbuild.org/2.21/docs/using-pants/advanced-target-selection#filter-optionswide-midnight-78598
08/16/2024, 2:45 AMoss/pants-plugins % pants list package
22:45:31.84 [WARN] No targets were matched in goal `list`.
22:45:31.84 [WARN] No files or targets specified. The `package` goal works with these target types:
* archive
* pex_binary
* python_distribution
* scie_binary
Please specify relevant file and/or target arguments. Run `pants --filter-target-type=archive,pex_binary,python_distribution,scie_binary list ::` to find all applicable targets in your project, or run `pants --filter-target-type=archive,pex_binary,python_distribution,scie_binary filedeps ::` to find all applicable files.
wide-midnight-78598
08/16/2024, 2:46 AMjq
at the end?best-midnight-81002
08/16/2024, 2:47 AMsed
out that part of the output, which will depend on the backends enabled in my pantsverse)best-midnight-81002
08/16/2024, 2:47 AMwide-midnight-78598
08/16/2024, 2:48 AMbest-midnight-81002
08/16/2024, 2:50 AMpants package ::
is failing in github actions CI (I suspect OOM), so I wanted to get a list of what all it's trying to do and see if I can pare that down to a smaller but useful set of targetsbest-midnight-81002
08/16/2024, 2:50 AMbest-midnight-81002
08/16/2024, 2:51 AMpants --filter-target-type=archive,docker_image,pex_binary,python_aws_lambda_function,python_aws_lambda_layer,python_distribution list ::
gives the output I wantwide-midnight-78598
08/16/2024, 2:52 AM--filter-goal
hook, as that seems pretty usefulbest-midnight-81002
08/16/2024, 2:53 AMpants package
prints out the command I'm looking for. But only once? if I re-run pants package
it no longer prints the warningwide-midnight-78598
08/16/2024, 2:54 AMbest-midnight-81002
08/16/2024, 2:54 AMbest-midnight-81002
08/16/2024, 2:55 AMwide-midnight-78598
08/16/2024, 2:58 AMpants peek :: | jq '.[] | select(.goals | index("package")) | .address'
oss/pants-plugins % pants peek :: | jq '.[] | select(.goals | index("package")) | .address'
"examples/python/core:core-dist"
"examples/python/hellofastapi:hellofastapi-pex"
"examples/python/hellofastapi:hellofastapi-scie"
"examples/python/hellofib:hellofib-dist"
"examples/python/hellofib:hellofib-mypyc"
"examples/python/hellofib:hellofib-pex"
"examples/python/hellofib:hellofib-scie"
"examples/python/hellokivy:hellokivy-pex"
"examples/python/hellokivy:hellokivy-scie"
"examples/python/hellonumpy:hellonumpy-pex"
"examples/python/hellonumpy:hellonumpy-scie"
"examples/python/hellotyper:hellotyper-pex"
"examples/python/hellotyper:hellotyper-scie"
"examples/python/hellowebview:hellowebview-pex"
"examples/python/hellowebview:hellowebview-scie"
"examples/python/helloworld:helloworld-pex"
"examples/python/helloworld:helloworld-scie"
"pants-plugins/experimental/scie:scie-dist"
best-midnight-81002
08/16/2024, 3:01 AMwide-midnight-78598
08/16/2024, 3:01 AMwitty-agent-59418
08/16/2024, 7:42 AM—-publishable
, mapped to a hardcoded list of our publishable types, which are limited.
We also had to add a skip-publish
tag to that alias - to exclude some intermediate docker images that we don’t ever want to publish.
There’s a skip publish param on the docker_image
, which prevents publish but didn’t affect the alias.
We then effectively use pants list —publishable
, as a pants package
preview in CIwide-midnight-78598
08/16/2024, 12:07 PMbest-midnight-81002
08/17/2024, 5:40 PMpants test ::
makes it surprising not to be able to query "what are all the test
-able targets"witty-agent-59418
08/19/2024, 10:00 AMcurved-manchester-66006
08/20/2024, 7:03 PM