Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure peeks output to allow for adding additional data #18546

Open
kaos opened this issue Mar 22, 2023 · 1 comment
Open

Structure peeks output to allow for adding additional data #18546

kaos opened this issue Mar 22, 2023 · 1 comment

Comments

@kaos
Copy link
Member

kaos commented Mar 22, 2023

          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:

[
  {
    "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)

@kaos
Copy link
Member Author

kaos commented Mar 22, 2023

Offer the old output schema as an option to ease the transition.

pants peek --output-legacy-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant