<#18546 Structure `peek`s output to allow for addi...
# github-notifications
c
#18546 Structure `peek`s output to allow for adding additional data Issue created by kaos
Copy code
as we're getting more data into the `peek` output, I am more and more inclined to suggest we add more scoping on the data, to reduce the risk of name conflicts and also make it easier to trim/pick the desired data out of it.
Concretely what I'm suggesting is to have the actual target field values pushed down into
fields
for instance, so the
peek
output could look like:
Copy code
[
  {
    "address": "src/python/pants/bin/remote_pants_runner.py",
    "target_type": "python_source",
    "fields": {
      "dependencies": [
        "src/python/pants/__init__.py",
        "src/python/pants/base/exiter.py",
        "src/python/pants/engine/internals/native_engine.pyi",
        "src/python/pants/option/global_options.py",
        "src/python/pants/option/options_bootstrapper.py",
        "src/python/pants/pantsd/pants_daemon_client.py"
      ],
      "description": null,
      "interpreter_constraints": null,
      "resolve": null,
      "restartable": false,
      "run_goal_use_sandbox": null,
      "skip_autoflake": false,
      "skip_black": false,
      "skip_docformatter": false,
      "skip_flake8": false,
      "skip_isort": false,
      "skip_mypy": false,
      "sources": [
        "src/python/pants/bin/remote_pants_runner.py"
      ],
      "tags": null
    },
    "raw_fields": {
      "dependencies": null,
      "source": "remote_pants_runner.py"
    },
    "sources_fingerprint": "...",
    "visibility": {
      "dependents_rules": ..,
      ..
    }
  },
  ..
]
maybe even write a schema for it's output format.. ;) Originally posted by @kaos in #18383 (comment) pantsbuild/pants