happy-kitchen-89482
09/28/2021, 11:37 PMhappy-kitchen-89482
09/28/2021, 11:37 PMhappy-kitchen-89482
09/28/2021, 11:38 PMpeek
goal currently emits a JSON structure with per-target information culled from BUILD files.happy-kitchen-89482
09/28/2021, 11:38 PMdependencies=
field, namely explicit dependencies.happy-kitchen-89482
09/28/2021, 11:39 PMhappy-kitchen-89482
09/28/2021, 11:40 PMdependencies
JSON key, as these are exactly the BUILD file fields), and one for "all dependencies" including the inferred ones.happy-kitchen-89482
09/28/2021, 11:40 PMhappy-kitchen-89482
09/28/2021, 11:40 PMhappy-kitchen-89482
09/28/2021, 11:42 PMdependencies
as is, to match the BUILD file fields, and find a new name for all dependencies.
B) Put all dependencies in dependencies
and find a new name for the explicit dependencies.
C) Find new names for both.
D) Nest the BUILD file information in a subobject, so that it's clear that all these keys are just verbatim from the BUILD file, and have the "all dependencies" information outside that subobject.
E) Something elsehappy-kitchen-89482
09/28/2021, 11:42 PMhundreds-father-404
09/28/2021, 11:47 PMdepenencies
to extra_deps
! We keep talking about how important dep inference is, so I think it improves clarity a lot that you're augmenting what's inferredhappy-kitchen-89482
09/28/2021, 11:50 PMextra
about them?happy-kitchen-89482
09/28/2021, 11:51 PMdependencies
today is just the BUILD file dependencieshappy-kitchen-89482
09/28/2021, 11:51 PMhappy-kitchen-89482
09/28/2021, 11:51 PMhappy-kitchen-89482
09/28/2021, 11:51 PMexplicit_dependencies
is goodhundreds-father-404
09/28/2021, 11:51 PMdependencies
field to extra_deps
. You are explicitly adding deps in a BUILD file, which are extra to the inferred oneshappy-kitchen-89482
09/28/2021, 11:51 PMhappy-kitchen-89482
09/28/2021, 11:52 PMhappy-kitchen-89482
09/28/2021, 11:53 PMpeek
should do, renaming the target field is a massive undertakinghappy-kitchen-89482
09/28/2021, 11:53 PMhundreds-father-404
09/28/2021, 11:54 PMdependencies
field extra_deps
what your option c was? Or instead you meant we're only changing names in ./pants peek
and not changing any build file symbols?hundreds-father-404
09/28/2021, 11:54 PMwitty-crayon-22786
09/28/2021, 11:55 PMwitty-crayon-22786
09/28/2021, 11:55 PMsources
as well⌠and shouldnât need a new name for the expanded version of each AsyncFieldhundreds-father-404
09/28/2021, 11:56 PM./pants peek --evaluate-fields
? --raw-fields
?happy-kitchen-89482
09/28/2021, 11:56 PMhappy-kitchen-89482
09/28/2021, 11:57 PMhappy-kitchen-89482
09/28/2021, 11:57 PMwitty-crayon-22786
09/28/2021, 11:57 PMAn option likeÂor the opposite, yeaâŚ?Â./pants peek --evaluate-fields
?--raw-fields
--raw-fields
happy-kitchen-89482
09/28/2021, 11:57 PMwitty-crayon-22786
09/28/2021, 11:57 PMhappy-kitchen-89482
09/28/2021, 11:58 PMhappy-kitchen-89482
09/28/2021, 11:58 PMbuild_file: {}, expanded: {}
happy-kitchen-89482
09/28/2021, 11:58 PMwitty-crayon-22786
09/28/2021, 11:59 PMwitty-crayon-22786
09/29/2021, 12:00 AMcurved-television-6568
09/29/2021, 7:55 AMpeek
would be most useful for is to inspect what information is available to a certain goal/rule is, to answer questions like âwhy does this not work/do what I wantâ or âwhere does this come from?â etc.
Given that, Iâd like to be able to query peek for this information, from a goals perspective, that is something like:
./pants peek --goal=package src/python/pants/bin:pants
And that presents the JSON data for all targets and the dependencies and sources fully expanded etc as consumed by package.
Regarding explicit vs infered/injected dependencies, if the structure is expanded, there could be a meta field on the nested data, indicating which it was.. as I think that dependencies are dependencies, explicit or inferred is just a means how they got there. If you for a particular query want to see only explicit for instance, that could be a filtering option to peek to exclude all other deps.
# current
[
{
"address": "src/python/pants/bin:pants",
"target_type": "pex_binary",
"always_write_cache": false,
"dependencies": [
":pants_loader" # => expand this
],
"description": null,
"emit_warnings": null,
...
# suggested =>
[
{
"address": "src/python/pants/bin:pants",
"target_type": "pex_binary",
"always_write_cache": false,
"dependencies": [
{
"address": "src/python/pants/bin:pants_loader",
"target_type": "python_library",
"dependencies": null,
"dependency_kind": "explicit", # peek meta field indicating kind of dependency
"description": null,
...
My splash of paint on the wall.. đhappy-kitchen-89482
09/29/2021, 3:41 PMhappy-kitchen-89482
09/29/2021, 3:41 PMhappy-kitchen-89482
09/29/2021, 3:41 PM./pants peek ::
will not give you the generated targets, only the generatorshundreds-father-404
09/29/2021, 3:42 PMhundreds-father-404
09/29/2021, 3:42 PMhappy-kitchen-89482
09/29/2021, 3:44 PMhappy-kitchen-89482
09/29/2021, 3:44 PMhappy-kitchen-89482
09/29/2021, 3:45 PMhappy-kitchen-89482
09/29/2021, 3:45 PMhundreds-father-404
09/29/2021, 3:45 PM