You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default version of a Python tool built-in to Pants (like black) doesn't seem to be shown in the documentation anywhere, it's just implied by the lockfile, which is hidden: e.g. https://www.pantsbuild.org/2.19/reference/subsystems/black
This leads to confusion when newer releases of a tool change behaviour, deprecate options or even introduce new ones (like #20707) and a user can't tell why their configuration isn't working when run with Pants.
Suggestion: have PythonToolRequirementsBase dynamically argument the subsystem's help text by reading the lockfile. For instance, for the page above, adding the second paragraph in:
Closes#20722. Here's what the new output looks like:
```bash
./pants help black
`black` subsystem options
-------------------------
The Black Python code formatter (https://black.readthedocs.io/).
This version of Pants uses black 23.3.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.
...
```
I couldn't work out how to test this except by running the CLI to
generate the description (see above). And that...seems to work?
---------
Co-authored-by: Huon Wilson <[email protected]>
Describe the bug
Currently the default version of a Python tool built-in to Pants (like black) doesn't seem to be shown in the documentation anywhere, it's just implied by the lockfile, which is hidden: e.g. https://www.pantsbuild.org/2.19/reference/subsystems/black
(Compare a JVM tool like
openapi-generator
which has a default value for the version field: https://www.pantsbuild.org/2.19/reference/subsystems/openapi-generator#version)This leads to confusion when newer releases of a tool change behaviour, deprecate options or even introduce new ones (like #20707) and a user can't tell why their configuration isn't working when run with Pants.
Suggestion: have
PythonToolRequirementsBase
dynamically argument the subsystem's help text by reading the lockfile. For instance, for the page above, adding the second paragraph in:This could potentially also be applied to the
install_from_resolve
and/orrequirements
fields.Pants version
2.19
OS
N/A
Additional info
N/A
The text was updated successfully, but these errors were encountered: