aloof-angle-91616
01/23/2019, 9:39 PM./pants list which also prints the stringified targets sounds extremely useful for debugging codegen tasks or context-aware object factories -- am i missing any existing facilities to do this?average-vr-56795
01/24/2019, 11:01 PMbazel query --output=build //some:target does this really nicely, and is super useful, so I would strongly support such a thing if we can make it work well 🙂aloof-angle-91616
01/24/2019, 11:01 PMaverage-vr-56795
01/24/2019, 11:06 PMsrcs as a literal list of source files, which is so helpful!)aloof-angle-91616
01/24/2019, 11:06 PMwitty-crayon-22786
01/24/2019, 11:07 PMaloof-angle-91616
01/24/2019, 11:07 PMPythonTarget(address=..., compatibility=..., ...)witty-crayon-22786
01/24/2019, 11:07 PMwitty-crayon-22786
01/24/2019, 11:08 PMwitty-crayon-22786
01/24/2019, 11:09 PMaverage-vr-56795
01/24/2019, 11:09 PMwitty-crayon-22786
01/24/2019, 11:09 PMaloof-angle-91616
01/24/2019, 11:09 PMwitty-crayon-22786
01/24/2019, 11:09 PM$ ./pants help buildozer
buildozer options:
Enables interaction with the Buildozer Go binary
--buildozer-add-dependencies=<str> (default: None)
    The dependency or dependencies to add
--buildozer-command=<str> (default: None)
    A custom buildozer command to execute
--buildozer-remove-dependencies=<str> (default: None)
    The dependency or dependencies to remove ?average-vr-56795
01/24/2019, 11:10 PMaloof-angle-91616
01/24/2019, 11:10 PMaverage-vr-56795
01/24/2019, 11:11 PM$ cat some/BUILD
my_codegen_target()
$ ./pants show some:
resources(
  name = "some",
  sources = ["foo", "bar"],
)aloof-angle-91616
01/24/2019, 11:11 PMaverage-vr-56795
01/24/2019, 11:11 PMaverage-vr-56795
01/24/2019, 11:11 PMaloof-angle-91616
01/24/2019, 11:12 PMaverage-vr-56795
01/24/2019, 11:12 PMwitty-crayon-22786
01/24/2019, 11:12 PMaloof-angle-91616
01/24/2019, 11:12 PMaverage-vr-56795
01/24/2019, 11:13 PMaverage-vr-56795
01/24/2019, 11:13 PMaloof-angle-91616
01/24/2019, 11:13 PMwitty-crayon-22786
01/24/2019, 11:13 PMaloof-angle-91616
01/24/2019, 11:13 PMwitty-crayon-22786
01/24/2019, 11:13 PMaverage-vr-56795
01/24/2019, 11:14 PMwitty-crayon-22786
01/24/2019, 11:14 PMaloof-angle-91616
01/24/2019, 11:15 PMaverage-vr-56795
01/24/2019, 11:16 PMaloof-angle-91616
01/24/2019, 11:17 PMwitty-crayon-22786
01/24/2019, 11:17 PMaloof-angle-91616
01/24/2019, 11:17 PMwitty-crayon-22786
01/24/2019, 11:18 PMaloof-angle-91616
01/24/2019, 11:18 PMwitty-crayon-22786
01/24/2019, 11:18 PMwitty-crayon-22786
01/24/2019, 11:18 PMaloof-angle-91616
01/24/2019, 11:19 PM./pants --query is more like it https://github.com/pantsbuild/pants/issues/6501#issuecomment-452069677aloof-angle-91616
01/24/2019, 11:19 PMaverage-vr-56795
01/24/2019, 11:21 PMdef make_my_targets():
  for i in range(100):
    junit_test(
      name = "test_{}".format(i),
      sources = ["Test{}.java".format(i)]
    )
make_my_targets()
with some arbitrarily complex code in the function.
Say I no longer need the flexibility of generating lots of these targets; for whatever reason my requirements change and there will always be exactly one of these targets. Being able to change my loop limit to 1, and then run ./pants show some:target is much nicer than me needing to manually execute the code by hand to write down what gets generated by the arbitrarily complicated code…aloof-angle-91616
01/24/2019, 11:22 PMaverage-vr-56795
01/24/2019, 11:22 PMaloof-angle-91616
01/24/2019, 11:22 PMaverage-vr-56795
01/24/2019, 11:22 PMaloof-angle-91616
01/24/2019, 11:23 PMaverage-vr-56795
01/24/2019, 11:23 PMaloof-angle-91616
01/24/2019, 11:23 PMaloof-angle-91616
01/24/2019, 11:24 PMaverage-vr-56795
01/24/2019, 11:25 PMaverage-vr-56795
01/24/2019, 11:26 PMaloof-angle-91616
01/24/2019, 11:26 PMaverage-vr-56795
01/24/2019, 11:27 PMwitty-crayon-22786
01/24/2019, 11:27 PMaloof-angle-91616
01/24/2019, 11:27 PMaloof-angle-91616
01/24/2019, 11:40 PMaverage-vr-56795
01/24/2019, 11:42 PMaloof-angle-91616
01/24/2019, 11:43 PMwitty-crayon-22786
01/24/2019, 11:44 PMaverage-vr-56795
01/24/2019, 11:44 PMaverage-vr-56795
01/24/2019, 11:45 PMaloof-angle-91616
01/24/2019, 11:57 PMaloof-angle-91616
01/24/2019, 11:57 PM