Type object
File match pants*.toml
Schema URL https://catalog.lintel.tools/schemas/schemastore/pantsbuild/latest.json
Source https://www.schemastore.org/pantsbuild-2.31.0.json

Versions

Validate with Lintel

npx @lintel/lintel check
Type: object

Pants configuration file schema: https://www.pantsbuild.org/

Properties

GLOBAL object

Options to control the overall behavior of Pants.

101 nested properties
allow_deprecated_macos_versions array

Silence warnings/errors about running Pants on these versions of macOS. Pants only supports recent versions of macOS. You can try running on older versions, but it may or may not work https://www.pantsbuild.org/v2.31/docs/reference-global#allow_deprecated_macos_versions

Default:
[]
backend_packages array
Default:
[]
build_file_prelude_globs array

Python files to evaluate and whose symbols should be exposed to all BUILD files https://www.pantsbuild.org/v2.31/docs/reference-global#build_file_prelude_globs

Default:
[]
build_ignore array

Path globs or literals to ignore when identifying BUILD files https://www.pantsbuild.org/v2.31/docs/reference-global#build_ignore

Default:
[]
build_patterns array

The naming scheme for BUILD files, i.e. where you define targets https://www.pantsbuild.org/v2.31/docs/reference-global#build_patterns

Default:
[
  "BUILD",
  "BUILD.*"
]
ca_certs_path string

Path to a file containing PEM-format CA certificates used for verifying secure connections when downloading files required by a build https://www.pantsbuild.org/v2.31/docs/reference-global#ca_certs_path

Default: null
cache_content_behavior enum

Controls how the content of cache entries is handled during process execution https://www.pantsbuild.org/v2.31/docs/reference-global#cache_content_behavior

Default: "fetch"
Values: "fetch" "validate" "defer"
colors boolean

Whether Pants should use colors in output or not https://www.pantsbuild.org/v2.31/docs/reference-global#colors

Default: true
concurrent boolean
Default: false
docker_execution boolean

If true, docker_environment targets can be used to run builds inside a Docker container https://www.pantsbuild.org/v2.31/docs/reference-global#docker_execution

Default: true
dynamic_ui boolean

Display a dynamically-updating console UI as Pants runs https://www.pantsbuild.org/v2.31/docs/reference-global#dynamic_ui

Default: true
dynamic_ui_renderer enum

If --dynamic-ui is enabled, selects the renderer https://www.pantsbuild.org/v2.31/docs/reference-global#dynamic_ui_renderer

Default: "indicatif-spinner"
Values: "indicatif-spinner" "experimental-prodash"
enable_target_origin_sources_blocks boolean
Default: false
engine_visualize_to

A directory to write execution and rule graphs to as dot files https://www.pantsbuild.org/v2.31/docs/reference-global#engine_visualize_to

Default: null
file_downloads_max_attempts number

When Pants downloads files (for example, for the http_source source), Pants will retry the download if a "retryable" error occurs https://www.pantsbuild.org/v2.31/docs/reference-global#file_downloads_max_attempts

Default: 4
file_downloads_retry_delay number

When Pants downloads files (for example, for the http_source source), Pants will retry the download if a "retryable" error occurs https://www.pantsbuild.org/v2.31/docs/reference-global#file_downloads_retry_delay

Default: 0.2
ignore_warnings array

Ignore logs and warnings matching these strings https://www.pantsbuild.org/v2.31/docs/reference-global#ignore_warnings

Default:
[]
keep_sandboxes enum

Controls whether Pants will clean up local directories used as chroots for running processes https://www.pantsbuild.org/v2.31/docs/reference-global#keep_sandboxes

Default: "never"
Values: "always" "on_failure" "never"
level enum
Default: "info"
Values: "trace" "debug" "info" "warn" "error"
local_cache boolean

Whether to cache process executions in a local cache persisted to disk at --local-store-dir https://www.pantsbuild.org/v2.31/docs/reference-global#local_cache

Default: true
local_execution_root_dir string

Directory to use for local process execution sandboxing https://www.pantsbuild.org/v2.31/docs/reference-global#local_execution_root_dir

Default: "<tmp_dir>"
local_store_dir string

Directory to use for the local file store, which stores the results of subprocesses run by Pants https://www.pantsbuild.org/v2.31/docs/reference-global#local_store_dir

Default: "$XDG_CACHE_HOME/lmdb_store"
local_store_directories_max_size_bytes number

The maximum size in bytes of the local store containing directories https://www.pantsbuild.org/v2.31/docs/reference-global#local_store_directories_max_size_bytes

Default: 16000000000
local_store_files_max_size_bytes number

The maximum size in bytes of the local store containing files https://www.pantsbuild.org/v2.31/docs/reference-global#local_store_files_max_size_bytes

Default: 256000000000
local_store_processes_max_size_bytes number

The maximum size in bytes of the local store containing process cache entries https://www.pantsbuild.org/v2.31/docs/reference-global#local_store_processes_max_size_bytes

Default: 16000000000
local_store_shard_count number

The number of LMDB shards created for the local store https://www.pantsbuild.org/v2.31/docs/reference-global#local_store_shard_count

Default: 16
log_levels_by_target object

Set a more specific logging level for one or more logging targets https://www.pantsbuild.org/v2.31/docs/reference-global#log_levels_by_target

Default:
{}
log_show_rust_3rdparty boolean

Whether to show/hide logging done by 3rdparty Rust crates used by the Pants engine https://www.pantsbuild.org/v2.31/docs/reference-global#log_show_rust_3rdparty

Default: false
logdir string

Write logs to files under this directory https://www.pantsbuild.org/v2.31/docs/reference-global#logdir

Default: null
loop boolean

Run goals continuously as file changes are detected https://www.pantsbuild.org/v2.31/docs/reference-global#loop

Default: false
loop_max number

The maximum number of times to loop when --loop is specified https://www.pantsbuild.org/v2.31/docs/reference-global#loop_max

Default: 4294967296
named_caches_dir string

Directory to use for named global caches for tools and processes with trusted, concurrency-safe caches https://www.pantsbuild.org/v2.31/docs/reference-global#named_caches_dir

Default: "$XDG_CACHE_HOME/named_caches"
pants_bin_name string

The name of the script or binary used to invoke Pants https://www.pantsbuild.org/v2.31/docs/reference-global#pants_bin_name

Default: "pants"
pants_config_files array
Default:
[
  "<buildroot>/pants.toml"
]
pants_distdir string

Write end products, such as the results of pants package, to this dir https://www.pantsbuild.org/v2.31/docs/reference-global#pants_distdir

Default: "<buildroot>/dist"
pants_ignore array

Paths to ignore for all filesystem operations performed by pants (e.g https://www.pantsbuild.org/v2.31/docs/reference-global#pants_ignore

Default:
[
  ".*/",
  "/dist/",
  "__pycache__",
  "!.semgrep/",
  "!.github/"
]
pants_ignore_use_gitignore boolean

Include patterns from .gitignore, .git/info/exclude, and the global gitignore files in the option [GLOBAL].pants_ignore, which is used for Pants to ignore filesystem operations on those patterns https://www.pantsbuild.org/v2.31/docs/reference-global#pants_ignore_use_gitignore

Default: true
pants_physical_workdir_base string

When set, a base directory in which to store --pants-workdir contents https://www.pantsbuild.org/v2.31/docs/reference-global#pants_physical_workdir_base

Default: null
pants_subprocessdir string

The directory to use for tracking subprocess metadata https://www.pantsbuild.org/v2.31/docs/reference-global#pants_subprocessdir

Default: "<buildroot>/.pants.d/pids"
pants_version string
Default: "<pants_version>"
pants_workdir string

Write intermediate logs and output files to this dir https://www.pantsbuild.org/v2.31/docs/reference-global#pants_workdir

Default: "<buildroot>/.pants.d/workdir"
pantsd boolean

Enables use of the Pants daemon (pantsd). pantsd can significantly improve runtime performance by lowering per-run startup cost, and by memoizing filesystem operations and rule execution https://www.pantsbuild.org/v2.31/docs/reference-global#pantsd

Default: true
pantsd_invalidation_globs array

Filesystem events matching any of these globs will trigger a daemon restart https://www.pantsbuild.org/v2.31/docs/reference-global#pantsd_invalidation_globs

Default:
[]
pantsd_max_memory_usage
Default: "4GiB"
pantsd_pailgun_port number
Default: 0
pantsd_timeout_when_multiple_invocations number

The maximum amount of time to wait for the invocation to start until raising a timeout exception https://www.pantsbuild.org/v2.31/docs/reference-global#pantsd_timeout_when_multiple_invocations

Default: 60.0
pantsrc boolean

Use pantsrc files located at the paths specified in the global option pantsrc_files https://www.pantsbuild.org/v2.31/docs/reference-global#pantsrc

Default: true
pantsrc_files array

Override config with values from these files, using syntax matching that of --pants-config-files https://www.pantsbuild.org/v2.31/docs/reference-global#pantsrc_files

Default:
[
  "/etc/pantsrc",
  "~/.pants.rc",
  ".pants.rc"
]
plugins array

Allow backends to be loaded from these plugins (usually released through PyPI). The default backends for each plugin will be loaded automatically https://www.pantsbuild.org/v2.31/docs/reference-global#plugins

Default:
[]
plugins_force_resolve boolean
Default: false
print_stacktrace boolean

Print the full exception stack trace for any errors https://www.pantsbuild.org/v2.31/docs/reference-global#print_stacktrace

Default: false
process_execution_cache_namespace string
Default: null
process_execution_graceful_shutdown_timeout number

The time in seconds to wait when gracefully shutting down an interactive process (such as one opened using pants run) before killing it https://www.pantsbuild.org/v2.31/docs/reference-global#process_execution_graceful_shutdown_timeout

Default: 3
process_execution_local_enable_nailgun boolean

Whether or not to use nailgun to run JVM requests that are marked as supporting nailgun https://www.pantsbuild.org/v2.31/docs/reference-global#process_execution_local_enable_nailgun

Default: true
process_execution_local_parallelism number

Number of concurrent processes that may be executed locally https://www.pantsbuild.org/v2.31/docs/reference-global#process_execution_local_parallelism

Default: "#cores"
process_execution_remote_parallelism number

Number of concurrent processes that may be executed remotely https://www.pantsbuild.org/v2.31/docs/reference-global#process_execution_remote_parallelism

Default: 128
process_per_child_memory_usage

The default memory usage for a single "pooled" child process https://www.pantsbuild.org/v2.31/docs/reference-global#process_per_child_memory_usage

Default: "512MiB"
process_total_child_memory_usage

The maximum memory usage for all "pooled" child processes https://www.pantsbuild.org/v2.31/docs/reference-global#process_total_child_memory_usage

Default: null
pythonpath array

Add these directories to PYTHONPATH to search for plugins https://www.pantsbuild.org/v2.31/docs/reference-global#pythonpath

Default:
[]
remote_ca_certs_path string

Path to a PEM file containing CA certificates used for verifying secure connections to [GLOBAL].remote_execution_address and [GLOBAL].remote_store_address https://www.pantsbuild.org/v2.31/docs/reference-global#remote_ca_certs_path

Default: null
remote_cache_read boolean
Default: false
remote_cache_rpc_concurrency number

The number of concurrent requests allowed to the remote cache service https://www.pantsbuild.org/v2.31/docs/reference-global#remote_cache_rpc_concurrency

Default: 128
remote_cache_rpc_timeout_millis number
Default: 1500
remote_cache_warnings enum

How frequently to log remote cache failures at the warn log level https://www.pantsbuild.org/v2.31/docs/reference-global#remote_cache_warnings

Default: "backoff"
Values: "ignore" "first_only" "backoff" "always"
remote_cache_write boolean

Whether to enable writing results to a remote cache https://www.pantsbuild.org/v2.31/docs/reference-global#remote_cache_write

Default: false
remote_client_certs_path string

Path to a PEM file containing client certificates used for verifying secure connections to [GLOBAL].remote_execution_address and [GLOBAL].remote_store_address when using client authentication (mTLS) https://www.pantsbuild.org/v2.31/docs/reference-global#remote_client_certs_path

Default: null
remote_client_key_path string

Path to a PEM file containing a private key used for verifying secure connections to [GLOBAL].remote_execution_address and [GLOBAL].remote_store_address when using client authentication (mTLS) https://www.pantsbuild.org/v2.31/docs/reference-global#remote_client_key_path

Default: null
remote_execution boolean

Enables remote workers for increased parallelism. (Alpha) https://www.pantsbuild.org/v2.31/docs/reference-global#remote_execution

Default: false
remote_execution_address string

The URI of a server/entity used as a remote execution scheduler https://www.pantsbuild.org/v2.31/docs/reference-global#remote_execution_address

Default: null
remote_execution_append_only_caches_base_path string

Sets the base path to use when setting up an append-only cache for a process running remotely https://www.pantsbuild.org/v2.31/docs/reference-global#remote_execution_append_only_caches_base_path

Default: null
remote_execution_extra_platform_properties array
Default:
[]
remote_execution_headers object
Default: "{}"
remote_execution_overall_deadline_secs number

Overall timeout in seconds for each remote execution request from time of submission https://www.pantsbuild.org/v2.31/docs/reference-global#remote_execution_overall_deadline_secs

Default: 3600
remote_execution_rpc_concurrency number

The number of concurrent requests allowed to the remote execution service https://www.pantsbuild.org/v2.31/docs/reference-global#remote_execution_rpc_concurrency

Default: 128
remote_instance_name string

Name of the remote instance to use by remote caching and remote execution https://www.pantsbuild.org/v2.31/docs/reference-global#remote_instance_name

Default: null
remote_oauth_bearer_token string

An oauth token to use for gGRPC connections to [GLOBAL].remote_execution_address and [GLOBAL].remote_store_address https://www.pantsbuild.org/v2.31/docs/reference-global#remote_oauth_bearer_token

Default: null
remote_provider enum
Default: "reapi"
Values: "reapi" "experimental-file" "experimental-github-actions-cache"
remote_store_address string

The URI of a server/entity used as a remote file store https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_address

Default: null
remote_store_batch_api_size_limit number

The maximum total size of blobs allowed to be sent in a single batch API call to the remote store https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_batch_api_size_limit

Default: 4194304
remote_store_batch_load_enabled boolean

Whether to enable batch load requests to the remote store https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_batch_load_enabled

Default: false
remote_store_chunk_bytes number

Size in bytes of chunks transferred to/from the remote file store https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_chunk_bytes

Default: 1048576
remote_store_headers object
Default: "{}"
remote_store_rpc_concurrency number

The number of concurrent requests allowed to the remote store service https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_rpc_concurrency

Default: 128
remote_store_rpc_retries number

Number of times to retry any RPC to the remote store before giving up https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_rpc_retries

Default: 2
remote_store_rpc_timeout_millis number

Timeout value for remote store RPCs (not including streaming requests) in milliseconds https://www.pantsbuild.org/v2.31/docs/reference-global#remote_store_rpc_timeout_millis

Default: 30000
rule_threads_core number

The number of threads to keep active and ready to execute @rule logic (see also: --rule-threads-max) https://www.pantsbuild.org/v2.31/docs/reference-global#rule_threads_core

Default: "max(2, #cores/2)"
rule_threads_max number

The maximum number of threads to use to execute @rule logic https://www.pantsbuild.org/v2.31/docs/reference-global#rule_threads_max

Default: null
sandboxer boolean
Default: false
session_end_tasks_timeout number

The time in seconds to wait for still-running "session end" tasks to complete before finishing completion of a Pants invocation. "Session end" tasks include, for example, writing data that was generated during the applicable Pants invocation to a configured remote cache https://www.pantsbuild.org/v2.31/docs/reference-global#session_end_tasks_timeout

Default: 3.0
show_log_target boolean

Display the target where a log message originates in that log message's output https://www.pantsbuild.org/v2.31/docs/reference-global#show_log_target

Default: false
spec_files array

Read additional specs (target addresses, files, and/or globs), one per line, from these files https://www.pantsbuild.org/v2.31/docs/reference-global#spec_files

Default:
[]
stats_record_option_scopes array
Default:
[
  "*"
]
streaming_workunits_complete_async boolean

True if stats recording should be allowed to complete asynchronously when pantsd is enabled https://www.pantsbuild.org/v2.31/docs/reference-global#streaming_workunits_complete_async

Default: true
streaming_workunits_level enum

The level of workunits that will be reported to streaming workunit event receivers https://www.pantsbuild.org/v2.31/docs/reference-global#streaming_workunits_level

Default: "debug"
Values: "trace" "debug" "info" "warn" "error"
streaming_workunits_report_interval number

Interval in seconds between when streaming workunit event receivers will be polled https://www.pantsbuild.org/v2.31/docs/reference-global#streaming_workunits_report_interval

Default: 1.0
subproject_roots array

Paths that correspond with build roots for any subproject that this project depends on https://www.pantsbuild.org/v2.31/docs/reference-global#subproject_roots

Default:
[]
tag array

Include only targets with these tags (optional '+' prefix) or without these tags ('-' prefix) https://www.pantsbuild.org/v2.31/docs/reference-global#tag

Default:
[]
unmatched_build_file_globs enum

What to do when files and globs specified in BUILD files, such as in the sources field, cannot be found https://www.pantsbuild.org/v2.31/docs/reference-global#unmatched_build_file_globs

Default: "warn"
Values: "ignore" "warn" "error"
unmatched_cli_globs enum

What to do when command line arguments, e.g. files and globs like dir::, cannot be found https://www.pantsbuild.org/v2.31/docs/reference-global#unmatched_cli_globs

Default: "error"
Values: "ignore" "warn" "error"
verify_config boolean

Verify that all config file values correspond to known options https://www.pantsbuild.org/v2.31/docs/reference-global#verify_config

Default: true
watch_filesystem boolean

Set to False if Pants should not watch the filesystem for changes. pantsd or loop may not be enabled https://www.pantsbuild.org/v2.31/docs/reference-global#watch_filesystem

Default: true
anonymous-telemetry object

Options related to sending anonymous stats to the Pants project, to aid development.

2 nested properties
enabled boolean

Whether to send anonymous telemetry to the Pants project https://www.pantsbuild.org/v2.31/docs/reference-anonymous-telemetry#enabled

Default: false
repo_id string
Default: null
autoflake object

The Autoflake Python code formatter (https://github.com/myint/autoflake).

This version of Pants uses autoflake version 2.3.1 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

7 nested properties
args array

Arguments to pass directly to Autoflake, e.g. --autoflake-args='--remove-all-unused-imports --target-version=py37 --quiet' https://www.pantsbuild.org/v2.31/docs/reference-autoflake#args

Default:
[
  "--remove-all-unused-imports"
]
console_script string
Default: "autoflake"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-autoflake#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-autoflake#requirements

Default:
[]
skip boolean

If true, don't use Autoflake when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-autoflake#skip

Default: false
black object

The Black Python code formatter (https://black.readthedocs.io/).

This version of Pants uses black version 24.10.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

9 nested properties
args array

Arguments to pass directly to Black, e.g. --black-args='--target-version=py37 --quiet' https://www.pantsbuild.org/v2.31/docs/reference-black#args

Default:
[]
config

Path to a TOML config file understood by Black (https://github.com/psf/black#configuration-format) https://www.pantsbuild.org/v2.31/docs/reference-black#config

Default: null
config_discovery boolean

If true, Pants will include any relevant pyproject.toml config files during runs https://www.pantsbuild.org/v2.31/docs/reference-black#config_discovery

Default: true
console_script string
Default: "black"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-black#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-black#requirements

Default:
[]
skip boolean

If true, don't use Black when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-black#skip

Default: false
build-deprecations-fixer object

A tool/plugin for fixing BUILD file deprecations (where possible).

This includes deprecations for:

  • Renamed targets
  • Renamed fields
1 nested properties
skip boolean

If true, don't use BUILD Deprecations Fixer when running pants fix https://www.pantsbuild.org/v2.31/docs/reference-build-deprecations-fixer#skip

Default: false
buildifier object

Buildifier is a tool for formatting BUILD files with a standard convention.

Pants supports running Buildifier on your Pants BUILD files for several reasons:

  • You might like the style that buildifier uses.
  • You might be incrementally adopting Pants from Bazel, and are already using buildifier.

Please note that there are differences from Bazel's BUILD files (which are Starlark) and Pants' BUILD files (which are Python), so buildifier may issue a syntax error. In practice, these errors should be rare. See https://bazel.build/rules/language#differences_with_python.

7 nested properties
args array

Arguments to pass directly to Buildifier, e.g. --buildifier-args='-lint=fix' https://www.pantsbuild.org/v2.31/docs/reference-buildifier#args

Default:
[]
known_versions array
Default:
[
  "8.0.3|macos_x86_64|b7a3152cde0b3971b1107f2274afe778c5c154dcdf6c9c669a231e3c004f047e|7772208",
  "8.0.3|macos_arm64|674c663f7b5cd03c002f8ca834a8c1c008ccb527a0a2a132d08a7a355883b22d|7717218",
  "8.0.3|linux_x86_64|c969487c1af85e708576c8dfdd0bb4681eae58aad79e68ae48882c70871841b7|7876618",
  "8.0.3|linux_arm64|bdd9b92e2c65d46affeecaefb54e68d34c272d1f4a8c5b54929a3e92ab78820a|7754590",
  "7.1.2|macos_x86_64|687c49c318fb655970cf716eed3c7bfc9caeea4f2931a2fd36593c458de0c537|7591232",
  "7.1.2|macos_arm64|d0909b645496608fd6dfc67f95d9d3b01d90736d7b8c8ec41e802cb0b7ceae7c|7528994",
  "7.1.2|linux_x86_64|28285fe7e39ed23dc1a3a525dfcdccbc96c0034ff1d4277905d2672a71b38f13|7702060",
  "7.1.2|linux_arm64|c22a44eee37b8927167ee6ee67573303f4e31171e7ec3a8ea021a6a660040437|7568336"
]
skip boolean

If true, don't use Buildifier when running pants fmt https://www.pantsbuild.org/v2.31/docs/reference-buildifier#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-buildifier#url_platform_mapping

Default:
{
  "linux_arm64": "linux-arm64",
  "linux_x86_64": "linux-amd64",
  "macos_arm64": "darwin-arm64",
  "macos_x86_64": "darwin-amd64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-buildifier#url_template

Default: "https://github.com/bazelbuild/buildtools/releases/download/v{version}/buildifier-{platform}"
use_unsupported_version enum

What action to take in case the requested version of Buildifier is not supported https://www.pantsbuild.org/v2.31/docs/reference-buildifier#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "8.0.3"
changed object

Tell Pants to detect what files and targets have changed from Git.

See https://www.pantsbuild.org/2.31/docs/using-pants/advanced-target-selection.

3 nested properties
dependents enum

Include direct or transitive dependents of changed targets https://www.pantsbuild.org/v2.31/docs/reference-changed#dependents

Default: "none"
Values: "none" "direct" "transitive"
diffspec string

Calculate changes contained within a given Git spec (commit range/SHA/ref) https://www.pantsbuild.org/v2.31/docs/reference-changed#diffspec

Default: null
since string

Calculate changes since this Git spec (commit range/SHA/ref) https://www.pantsbuild.org/v2.31/docs/reference-changed#since

Default: null
check object

Run type checking or the lightest variant of compilation available for a language.

1 nested properties
only array

Only run these checkers and skip all others https://www.pantsbuild.org/v2.31/docs/reference-check#only

Default:
[]
check-default-tools object

Options for checking that external tool default locations are correctly typed.

cli object

Options for configuring CLI behavior, such as command line aliases.

1 nested properties
alias object
Default:
{}
complete object

Generates a completion script for the specified shell. The script is printed to stdout.

For example, pants complete --shell=zsh > pants-completions.zsh will generate a zsh completion script and write it to the file pants-completions.zsh. You can then source this file in your .zshrc file to enable completion for Pants.

This command is also used by the completion scripts to generate the completion options using passthrough options. This usage is not intended for use by end users, but could be useful for building custom completion scripts.

An example of this usage is in the bash completion script, where we use the following command: pants complete -- ${COMP_WORDS[@]}. This will generate the completion options for the current args, and then pass them to the bash completion script.

1 nested properties
shell enum

Which shell completion type should be printed to stdout https://www.pantsbuild.org/v2.31/docs/reference-complete#shell

Default: "bash"
Values: "bash" "zsh"
count-loc object

Count lines of code.

coursier object

A dependency resolver for the Maven ecosystem. (https://get-coursier.io/)

7 nested properties
jvm_index string
Default: ""
known_versions array
Default:
[
  "v2.1.24|macos_arm64 |8f47594eb62dea25af913c8932d1f1d86a3a9c8e1262925b63852635390a3f43|21541383|https://github.com/VirtusLab/coursier-m1/releases/download/v2.1.24/cs-aarch64-apple-darwin.gz",
  "v2.1.24|linux_arm64 |96b4c7580d253b6999a40e94413ca6c4a9bd2339ecce4754ac31a26d1a12fcbf|21534519|https://github.com/VirtusLab/coursier-m1/releases/download/v2.1.24/cs-aarch64-pc-linux.gz",
  "v2.1.24|linux_x86_64|d2c0572a17fb6146ea65349b59dd216b38beff60ae22bce6e549867c6ed2eda6|23366878",
  "v2.1.24|macos_x86_64|33913cd6b61658035d9e6fe971e919cb0ef1f659aa7bff7deeded963a2d36385|22442034",
  "v2.1.6|macos_arm64 |746b3e346fa2c0107fdbc8a627890d495cb09dee4f8dcc87146bdb45941088cf|20829782|https://github.com/VirtusLab/coursier-m1/releases/download/v2.1.6/cs-aarch64-apple-darwin.gz",
  "v2.1.6|linux_arm64 |33330ca433781c9db9458e15d2d32e5d795de3437771647e26835e8b1391af82|20899290|https://github.com/VirtusLab/coursier-m1/releases/download/v2.1.6/cs-aarch64-pc-linux.gz",
  "v2.1.6|linux_x86_64|af7234f8802107f5e1130307ef8a5cc90262d392f16ddff7dce27a4ed0ddd292|20681688",
  "v2.1.6|macos_x86_64|36a5d42a0724be2ac39d0ebd8869b985e3d58ceb121bc60389ee2d6d7408dd56|20037412",
  "v2.1.0-M5-18-gfebf9838c|linux_arm64 |d4ad15ba711228041ad8a46d848c83c8fbc421d7b01c415d8022074dd609760f|19264005",
  "v2.1.0-M5-18-gfebf9838c|linux_x86_64|3e1a1ad1010d5582e9e43c5a26b273b0147baee5ebd27d3ac1ab61964041c90b|19551533",
  "v2.1.0-M5-18-gfebf9838c|macos_arm64 |d13812c5a5ef4c9b3e25cc046d18addd09bacd149f95b20a14e4d2a73e358ecf|18826510",
  "v2.1.0-M5-18-gfebf9838c|macos_x86_64|d13812c5a5ef4c9b3e25cc046d18addd09bacd149f95b20a14e4d2a73e358ecf|18826510",
  "v2.0.16-169-g194ebc55c|linux_arm64 |da38c97d55967505b8454c20a90370c518044829398b9bce8b637d194d79abb3|18114472",
  "v2.0.16-169-g194ebc55c|linux_x86_64|4c61a634c4bd2773b4543fe0fc32210afd343692891121cddb447204b48672e8|18486946",
  "v2.0.16-169-g194ebc55c|macos_arm64 |15bce235d223ef1d022da30b67b4c64e9228d236b876c834b64e029bbe824c6f|17957182",
  "v2.0.16-169-g194ebc55c|macos_x86_64|15bce235d223ef1d022da30b67b4c64e9228d236b876c834b64e029bbe824c6f|17957182"
]
repos array

Maven style repositories to resolve artifacts from https://www.pantsbuild.org/v2.31/docs/reference-coursier#repos

Default:
[
  "https://maven-central.storage-download.googleapis.com/maven2",
  "https://repo1.maven.org/maven2"
]
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-coursier#url_platform_mapping

Default:
{
  "linux_arm64": "aarch64-pc-linux",
  "linux_x86_64": "x86_64-pc-linux",
  "macos_arm64": "x86_64-apple-darwin",
  "macos_x86_64": "x86_64-apple-darwin"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-coursier#url_template

Default: "https://github.com/coursier/coursier/releases/download/{version}/cs-{platform}.gz"
use_unsupported_version enum

What action to take in case the requested version of coursier is not supported https://www.pantsbuild.org/v2.31/docs/reference-coursier#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "v2.1.24"
coverage-py object

Configuration for Python test coverage measurement.

This version of Pants uses coverage version 7.10.7 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

12 nested properties
config

Path to an INI or TOML config file understood by coverage.py (https://coverage.readthedocs.io/en/latest/config.html) https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#config

Default: null
config_discovery boolean

If true, Pants will include any relevant config files during runs (.coveragerc, setup.cfg, tox.ini, and pyproject.toml) https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#config_discovery

Default: true
console_script string
Default: "coverage"
entry_point string
Default: null
fail_under number

Fail if the total combined coverage percentage for all tests is less than this number https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#fail_under

Default: null
filter array

A list of Python modules or filesystem paths to use in the coverage report, e.g. ['helloworld_test', 'helloworld/util/dirutil'] https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#filter

Default:
[]
global_report boolean

If true, Pants will generate a global coverage report https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#global_report

Default: false
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
output_dir string
Default: "{distdir}/coverage/python"
report enum
Default:
[
  "console"
]
Values: "console" "xml" "html" "raw" "json" "lcov"
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-coverage-py#requirements

Default:
[]
debug-adapter object

Options used to configure and launch a Debug Adapter server.

See https://microsoft.github.io/debug-adapter-protocol/ for more information.

2 nested properties
host string

The hostname to use when launching the server https://www.pantsbuild.org/v2.31/docs/reference-debug-adapter#host

Default: "127.0.0.1"
port number
Default: 5678
debugpy object

An implementation of the Debug Adapter Protocol for Python (https://github.com/microsoft/debugpy).

This version of Pants uses debugpy version 1.6.7.post1 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

6 nested properties
args array

Arguments to pass directly to debugpy, e.g. --debugpy-args='--log-to-stderr' https://www.pantsbuild.org/v2.31/docs/reference-debugpy#args

Default:
[]
console_script string
Default: null
entry_point string
Default: "debugpy"
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-debugpy#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-debugpy#requirements

Default:
[]
dependencies object

List the dependencies of the input files/targets.

5 nested properties
closed boolean

Include the input targets in the output, along with the dependencies https://www.pantsbuild.org/v2.31/docs/reference-dependencies#closed

Default: false
format enum
Default: "text"
Values: "text" "json"
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-dependencies#sep

Default: "\n"
transitive boolean
Default: false
dependents object

List all targets that depend on any of the input files/targets.

5 nested properties
closed boolean

Include the input targets in the output, along with the dependents https://www.pantsbuild.org/v2.31/docs/reference-dependents#closed

Default: false
format enum
Default: "text"
Values: "text" "json"
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-dependents#sep

Default: "\n"
transitive boolean
Default: false
docformatter object

The Python docformatter tool (https://github.com/myint/docformatter).

This version of Pants uses docformatter version 1.4 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

7 nested properties
args array

Arguments to pass directly to docformatter, e.g. --docformatter-args='--wrap-summaries=100 --pre-summary-newline' https://www.pantsbuild.org/v2.31/docs/reference-docformatter#args

Default:
[]
console_script string
Default: "docformatter"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-docformatter#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-docformatter#requirements

Default:
[]
skip boolean

If true, don't use docformatter when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-docformatter#skip

Default: false
docker object

Options for interacting with Docker.

17 nested properties
build_args array

Global build arguments (for Docker --build-arg options) to use for all docker build invocations https://www.pantsbuild.org/v2.31/docs/reference-docker#build_args

Default:
[]
build_hosts object

Hosts entries to be added to the /etc/hosts file in all built images https://www.pantsbuild.org/v2.31/docs/reference-docker#build_hosts

Default:
{}
build_no_cache boolean

Do not use the Docker cache when building images https://www.pantsbuild.org/v2.31/docs/reference-docker#build_no_cache

Default: false
build_target_stage string

Global default value for target_stage on docker_image targets, overriding the field value on the targets, if there is a matching stage in the Dockerfile https://www.pantsbuild.org/v2.31/docs/reference-docker#build_target_stage

Default: null
build_verbose boolean

Whether to log the Docker output to the console https://www.pantsbuild.org/v2.31/docs/reference-docker#build_verbose

Default: false
default_context_root

Provide a default Docker build context root path for docker_image targets that does not specify their own context_root field https://www.pantsbuild.org/v2.31/docs/reference-docker#default_context_root

Default: ""
default_repository string

Configure the default repository name used in the Docker image tag https://www.pantsbuild.org/v2.31/docs/reference-docker#default_repository

Default: "{name}"
env_vars array

Environment variables to set for docker invocations https://www.pantsbuild.org/v2.31/docs/reference-docker#env_vars

Default:
[]
executable_search_paths array

The PATH value that will be used to find the Docker client and any tools required https://www.pantsbuild.org/v2.31/docs/reference-docker#executable_search_paths

Default:
[
  "<PATH>"
]
optional_tools array

List any additional executables which are not mandatory for Docker to work, but which should be included if available https://www.pantsbuild.org/v2.31/docs/reference-docker#optional_tools

Default:
[]
publish_noninteractively boolean
Default: false
registries object | string
Default:
{}
run_args array

Additional arguments to use for docker run invocations https://www.pantsbuild.org/v2.31/docs/reference-docker#run_args

Default:
[
  "--interactive",
  "--tty"
]
suggest_renames boolean

When true and, the docker_image build fails, enrich the logs with suggestions for renaming source file COPY instructions where possible https://www.pantsbuild.org/v2.31/docs/reference-docker#suggest_renames

Default: true
tailor boolean

If true, add docker_image targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-docker#tailor

Default: true
tools array

List any additional executable tools required for Docker to work https://www.pantsbuild.org/v2.31/docs/reference-docker#tools

Default:
[]
use_buildx boolean
Default: false
dockerfile-parser object

Used to parse Dockerfile build specs to infer their dependencies.

This version of Pants uses dockerfile version 3.4.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

4 nested properties
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-dockerfile-parser#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-dockerfile-parser#requirements

Default:
[]
use_rust_parser boolean

Use the new Rust-based, multithreaded, in-process dependency parser https://www.pantsbuild.org/v2.31/docs/reference-dockerfile-parser#use_rust_parser

Default: true
environments-preview object

A highly experimental subsystem to allow setting environment variables and executable search paths for different environments, e.g. macOS vs. Linux.

1 nested properties
names object

A mapping of logical names to addresses to environment targets https://www.pantsbuild.org/v2.31/docs/reference-environments-preview#names

Default:
{}
experimental-deploy object

Perform a deployment process.

2 nested properties
dry_run boolean

If true, perform a dry run without deploying anything https://www.pantsbuild.org/v2.31/docs/reference-experimental-deploy#dry_run

Default: false
publish_dependencies boolean

If false, don't publish target dependencies before deploying the target https://www.pantsbuild.org/v2.31/docs/reference-experimental-deploy#publish_dependencies

Default: true
experimental-explorer object

Run the Pants Explorer Web UI server.

2 nested properties
address string
Default: "localhost"
port number
Default: 8000
export object

Export Pants data for use in other tools, such as IDEs.

:::caution Exporting tools requires creating a custom lockfile for them

Follow the instructions for creating tool lockfiles

:::

6 nested properties
bin array
Default:
[]
py_editable_in_resolve array

When exporting a mutable virtualenv for a resolve, do PEP-660 editable installs of all python_distribution targets that own code in the exported resolve https://www.pantsbuild.org/v2.31/docs/reference-export#py_editable_in_resolve

Default:
[]
py_generated_sources_in_resolve array

When exporting a mutable virtualenv for a resolve listed in this option, generate sources which result from code generation (for example, the protobuf_sources and thrift_sources target types) into the mutable virtualenv exported for that resolve https://www.pantsbuild.org/v2.31/docs/reference-export#py_generated_sources_in_resolve

Default:
[]
py_non_hermetic_scripts_in_resolve array

When exporting a mutable virtualenv for a resolve listed in this option, by default console script shebang lines will be made "hermetic" https://www.pantsbuild.org/v2.31/docs/reference-export#py_non_hermetic_scripts_in_resolve

Default:
[]
py_resolve_format enum
Default: "mutable_virtualenv"
Values: "mutable_virtualenv" "symlinked_immutable_virtualenv"
resolve array
Default:
[]
export-codegen object

Write generated files to dist/codegen for use outside of Pants.

filedeps object

List all source and BUILD files a target depends on.

5 nested properties
absolute boolean
Default: false
globs boolean

Instead of outputting filenames, output the original globs used in the BUILD file https://www.pantsbuild.org/v2.31/docs/reference-filedeps#globs

Default: false
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-filedeps#sep

Default: "\n"
transitive boolean

If True, list files from all dependencies, including transitive dependencies https://www.pantsbuild.org/v2.31/docs/reference-filedeps#transitive

Default: false
filter object

Filter the input targets based on various criteria.

Most of the filtering options below are comma-separated lists of filtering criteria, with an implied logical OR between them, so that a target passes the filter if it matches any of the criteria in the list.

A '-' prefix inverts the sense of the entire comma-separated list, so that a target passes the filter only if it matches none of the criteria in the list.

Each of the filtering options may be specified multiple times, with an implied logical AND between them.

6 nested properties
address_regex array

Filter targets based on each target's address matching the provided regular expressions https://www.pantsbuild.org/v2.31/docs/reference-filter#address_regex

Default:
[]
granularity enum

Filter to rendering only targets declared in BUILD files, only file-level targets, or all targets https://www.pantsbuild.org/v2.31/docs/reference-filter#granularity

Default: "all"
Values: "all" "file" "BUILD"
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-filter#sep

Default: "\n"
tag_regex array

Filter targets based on whether any of each target's tags (in the target's tags field) matches the provided regular expressions https://www.pantsbuild.org/v2.31/docs/reference-filter#tag_regex

Default:
[]
target_type array

Filter targets based each targets's target type, e.g. resources or python_sources https://www.pantsbuild.org/v2.31/docs/reference-filter#target_type

Default:
[]
fix object

Autofix source code.

This goal runs tools that make 'semantic' changes to source code, where the meaning of the code may change.

See also:

  • [The fmt goal](https://www.pantsbuild.org/2.31/reference/goals/fix will run code-editing tools that may make only syntactic changes, not semantic ones. The fix includes running these fmt tools by default (see the skip_formatters option to control this).

  • The lint goal will validate code is formatted, by running these fixers and checking there's no change.

  • Documentation about formatters for various ecosystems, such as: Python, JVM, SQL

3 nested properties
batch_size number

The target number of files to be included in each fixer batch https://www.pantsbuild.org/v2.31/docs/reference-fix#batch_size

Default: 128
only array

Only run these fixers and skip all others https://www.pantsbuild.org/v2.31/docs/reference-fix#only

Default:
[]
skip_formatters boolean
Default: false
flake8 object

The Flake8 Python linter (https://flake8.pycqa.org/).

This version of Pants uses flake8 version 6.1.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

10 nested properties
args array

Arguments to pass directly to Flake8, e.g. --flake8-args='--ignore E123,W456 --enable-extensions H111' https://www.pantsbuild.org/v2.31/docs/reference-flake8#args

Default:
[]
config

Path to an INI config file understood by Flake8 (https://flake8.pycqa.org/en/latest/user/configuration.html) https://www.pantsbuild.org/v2.31/docs/reference-flake8#config

Default: null
config_discovery boolean

If true, Pants will include any relevant config files during runs (.flake8, flake8, setup.cfg, and tox.ini) https://www.pantsbuild.org/v2.31/docs/reference-flake8#config_discovery

Default: true
console_script string
Default: "flake8"
entry_point string
Default: null
extra_files array

Paths to extra files to include in the sandbox https://www.pantsbuild.org/v2.31/docs/reference-flake8#extra_files

Default:
[]
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-flake8#install_from_resolve

Default: null
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-flake8#requirements

Default:
[]
skip boolean

If true, don't use Flake8 when running pants lint https://www.pantsbuild.org/v2.31/docs/reference-flake8#skip

Default: false
source_plugins array

An optional list of python_sources target addresses to load first-party plugins https://www.pantsbuild.org/v2.31/docs/reference-flake8#source_plugins

Default:
[]
fmt object

Autoformat source code.

This goal runs tools that make 'syntactic' changes to source code, where the meaning of the code doesn't (usually) change.

See also:

  • The fix goal will run code-editing tools that may make semantic changes, not just syntactic ones.

  • The lint goal will validate code is formatted, by running these formatters and checking there's no change.

  • Documentation about formatters for various ecosystems, such as: Python, Go, JVM, Shell.

2 nested properties
batch_size number

The target number of files to be included in each formatter batch https://www.pantsbuild.org/v2.31/docs/reference-fmt#batch_size

Default: 128
only array

Only run these formatters and skip all others https://www.pantsbuild.org/v2.31/docs/reference-fmt#only

Default:
[]
generate-lockfiles object

Generate lockfiles for third-party dependencies.

4 nested properties
custom_command string

If set, lockfile metadata will say to run this command to regenerate the lockfile, rather than running pants generate-lockfiles --resolve=<name> like normal https://www.pantsbuild.org/v2.31/docs/reference-generate-lockfiles#custom_command

Default: null
diff boolean

Print a summary of changed distributions after generating the lockfile https://www.pantsbuild.org/v2.31/docs/reference-generate-lockfiles#diff

Default: true
diff_include_unchanged boolean

Include unchanged distributions in the diff summary output https://www.pantsbuild.org/v2.31/docs/reference-generate-lockfiles#diff_include_unchanged

Default: false
resolve array

Only generate lockfiles for the specified resolve(s) https://www.pantsbuild.org/v2.31/docs/reference-generate-lockfiles#resolve

Default:
[]
generate-snapshots object

Generate test snapshots.

go-generate object

Run each command in a package described by a //go:generate directive. This is equivalent to running go generate on a Go package.

Note: Just like with go generate, the go-generate goal is never run as part of the build and must be run manually to invoke the commands described by the //go:generate directives.

See https://go.dev/blog/generate for details.

1 nested properties
env_vars array

Environment variables to set when invoking generator programs https://www.pantsbuild.org/v2.31/docs/reference-go-generate#env_vars

Default:
[
  "LANG",
  "LC_CTYPE",
  "LC_ALL",
  "PATH"
]
go-test object

Options for Go tests.

15 nested properties
args array

Arguments to pass directly to Go test binary, e.g. --go-test-args='-run TestFoo -v' https://www.pantsbuild.org/v2.31/docs/reference-go-test#args

Default:
[]
block_profile boolean

Capture a goroutine blocking profile from the execution of the test runner https://www.pantsbuild.org/v2.31/docs/reference-go-test#block_profile

Default: false
cover_mode enum

Coverage mode to use when running Go tests with coverage analysis enabled via --test-use-coverage https://www.pantsbuild.org/v2.31/docs/reference-go-test#cover_mode

Default: "set"
Values: "set" "count" "atomic"
coverage_html boolean

If true, then convert coverage reports to HTML format and write a coverage.html file next to the raw coverage data https://www.pantsbuild.org/v2.31/docs/reference-go-test#coverage_html

Default: true
coverage_output_dir string
Default: "{distdir}/coverage/go/{target_spec}"
coverage_packages array

A list of "import path patterns" for determining which import paths will be instrumented for code coverage https://www.pantsbuild.org/v2.31/docs/reference-go-test#coverage_packages

Default:
[]
cpu_profile boolean

Capture a CPU profile from the execution of the test runner https://www.pantsbuild.org/v2.31/docs/reference-go-test#cpu_profile

Default: false
force_asan boolean

If true, then always enable interoperation between Go and the C/C++ "address sanitizer" when running tests regardless of the test-by-test asan field on the relevant go_package target https://www.pantsbuild.org/v2.31/docs/reference-go-test#force_asan

Default: false
force_msan boolean

If true, then always enable interoperation between Go and the C/C++ "memory sanitizer" when running tests regardless of the test-by-test msan field on the relevant go_package target https://www.pantsbuild.org/v2.31/docs/reference-go-test#force_msan

Default: false
force_race boolean

If true, then always enable the Go data race detector when running tests regardless of the test-by-test test_race field on the relevant go_package target https://www.pantsbuild.org/v2.31/docs/reference-go-test#force_race

Default: false
mem_profile boolean

Capture an allocation profile from the execution of the test runner after tests have passed https://www.pantsbuild.org/v2.31/docs/reference-go-test#mem_profile

Default: false
mutex_profile boolean

Capture a mutex contention profile from the execution of the test runner when all tests are complete https://www.pantsbuild.org/v2.31/docs/reference-go-test#mutex_profile

Default: false
output_test_binary boolean

Write the test binary to the test extra output directory https://www.pantsbuild.org/v2.31/docs/reference-go-test#output_test_binary

Default: false
skip boolean

If true, don't use Go test binary when running pants test https://www.pantsbuild.org/v2.31/docs/reference-go-test#skip

Default: false
trace boolean

Capture an execution trace from the execution of the test runner https://www.pantsbuild.org/v2.31/docs/reference-go-test#trace

Default: false
gofmt object

Gofmt-specific options.

2 nested properties
args array

Arguments to pass directly to gofmt, e.g. --gofmt-args='-s -e' https://www.pantsbuild.org/v2.31/docs/reference-gofmt#args

Default:
[]
skip boolean

If true, don't use gofmt when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-gofmt#skip

Default: false
golang object

Options for Golang support.

19 nested properties
asdf_bin_relpath string

The path relative to an ASDF install directory to use to find the bin directory within an installed Go distribution https://www.pantsbuild.org/v2.31/docs/reference-golang#asdf_bin_relpath

Default: "bin"
asdf_tool_name string

The ASDF tool name to use when searching for installed Go distributions using the ASDF tool manager (https://asdf-vm.com/) https://www.pantsbuild.org/v2.31/docs/reference-golang#asdf_tool_name

Default: "go-sdk"
cgo_c_flags array

Compiler options used when compiling C code when Cgo is enabled https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_c_flags

Default:
[
  "-g",
  "-O2"
]
cgo_cxx_flags array

Compiler options used when compiling C++ code when Cgo is enabled https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_cxx_flags

Default:
[
  "-g",
  "-O2"
]
cgo_enabled boolean

Enable Cgo support, which allows Go and C code to interact https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_enabled

Default: true
cgo_fortran_binary_name string

Name of the tool to use to compile fortran code included via CGo in a Go package https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_fortran_binary_name

Default: "gfortran"
cgo_fortran_flags array

Compiler options used when compiling Fortran code when Cgo is enabled https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_fortran_flags

Default:
[
  "-g",
  "-O2"
]
cgo_gcc_binary_name string

Name of the tool to use to compile C code included via CGo in a Go package https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_gcc_binary_name

Default: "gcc"
cgo_gxx_binary_name string

Name of the tool to use to compile C++ code included via CGo in a Go package https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_gxx_binary_name

Default: "g++"
cgo_linker_flags array

Compiler options used when linking native code when Cgo is enabled https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_linker_flags

Default:
[
  "-g",
  "-O2"
]
cgo_tool_search_paths array

A list of paths to search for tools needed by CGo (e.g., gcc, g++) https://www.pantsbuild.org/v2.31/docs/reference-golang#cgo_tool_search_paths

Default:
[
  "<PATH>"
]
external_linker_binary_name string

Name of the tool to use as the "external linker" when invoking go tool link https://www.pantsbuild.org/v2.31/docs/reference-golang#external_linker_binary_name

Default: "gcc"
extra_tools array

List any additional executable tools required for the go tool to work https://www.pantsbuild.org/v2.31/docs/reference-golang#extra_tools

Default:
[]
go_search_paths array

A list of paths to search for Go and extra tools needed by go https://www.pantsbuild.org/v2.31/docs/reference-golang#go_search_paths

Default:
[
  "<PATH>"
]
minimum_expected_version string

The minimum Go version the distribution discovered by Pants must support https://www.pantsbuild.org/v2.31/docs/reference-golang#minimum_expected_version

Default: "1.17"
subprocess_env_vars array

Environment variables to set when invoking the go tool https://www.pantsbuild.org/v2.31/docs/reference-golang#subprocess_env_vars

Default:
[
  "LANG",
  "LC_CTYPE",
  "LC_ALL",
  "PATH"
]
tailor_binary_targets boolean

If true, add a go_binary target with the tailor goal in every directory with a .go file with package main https://www.pantsbuild.org/v2.31/docs/reference-golang#tailor_binary_targets

Default: true
tailor_go_mod_targets boolean

If true, add a go_mod target with the tailor goal wherever there is a go.mod file https://www.pantsbuild.org/v2.31/docs/reference-golang#tailor_go_mod_targets

Default: true
tailor_package_targets boolean

If true, add a go_package target with the tailor goal in every directory with a .go file https://www.pantsbuild.org/v2.31/docs/reference-golang#tailor_package_targets

Default: true
google-java-format object

Google Java Format (https://github.com/google/google-java-format)

6 nested properties
aosp boolean

Use AOSP style instead of Google Style (4-space indentation). ("AOSP" is the Android Open Source Project.) https://www.pantsbuild.org/v2.31/docs/reference-google-java-format#aosp

Default: false
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-google-java-format#artifacts

Default:
[
  "com.google.googlejavaformat:google-java-format:{version}"
]
jvm_options array

List of JVM options to pass to google-java-format JVM processes https://www.pantsbuild.org/v2.31/docs/reference-google-java-format#jvm_options

Default:
[]
lockfile string
Default: "<default>"
skip boolean

If true, don't use Google Java Format when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-google-java-format#skip

Default: false
version string
Default: "1.13.0"
graphql object

Options for the explorer GraphQL API.

1 nested properties
open_graphiql boolean
Default: false
hadolint object

A linter for Dockerfiles.

9 nested properties
args array

Arguments to pass directly to Hadolint, e.g. --hadolint-args='--format json' https://www.pantsbuild.org/v2.31/docs/reference-hadolint#args

Default:
[]
config

Path to an YAML config file understood by Hadolint (https://github.com/hadolint/hadolint#configure) https://www.pantsbuild.org/v2.31/docs/reference-hadolint#config

Default: null
config_discovery boolean

If true, Pants will include all relevant config files during runs (.hadolint.yaml and .hadolint.yml) https://www.pantsbuild.org/v2.31/docs/reference-hadolint#config_discovery

Default: true
known_versions array
Default:
[
  "v2.12.1-beta|macos_x86_64 |911008b09e88b9ce62dbd12345af8f4c933370ebcfb01211d934f1e0a4d9aecc|19743768",
  "v2.12.1-beta|macos_arm64 |911008b09e88b9ce62dbd12345af8f4c933370ebcfb01211d934f1e0a4d9aecc|19743768",
  "v2.12.1-beta|linux_x86_64|d0779284293475905cfa4b3a7b5c433eca6d731e45b5df0e157f46b4e6311888|2426420",
  "v2.12.1-beta|linux_arm64 |5997119de9b8332a003be938baff3ebd2ff17dfb62e2bceccd59bd9c112599ce|24002600"
]
skip boolean

If true, don't use Hadolint when running pants lint https://www.pantsbuild.org/v2.31/docs/reference-hadolint#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-hadolint#url_platform_mapping

Default:
{
  "linux_arm64": "Linux-arm64",
  "linux_x86_64": "Linux-x86_64",
  "macos_arm64": "Darwin-x86_64",
  "macos_x86_64": "Darwin-x86_64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-hadolint#url_template

Default: "https://github.com/hadolint/hadolint/releases/download/{version}/hadolint-{platform}"
use_unsupported_version enum

What action to take in case the requested version of Hadolint is not supported https://www.pantsbuild.org/v2.31/docs/reference-hadolint#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "v2.12.1-beta"
help object

Display usage message.

help-advanced object

Help for advanced options.

help-all object

Print a JSON object containing all help info.

internal-generate-test-lockfile-fixtures object

[Internal] Generate test lockfile fixtures for Pants tests.

ipython object

The IPython enhanced REPL (https://ipython.org/).

This version of Pants uses ipython version 8.18.1 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

5 nested properties
console_script string
Default: "ipython"
entry_point string
Default: null
ignore_cwd boolean

Whether to tell IPython not to put the CWD on the import path https://www.pantsbuild.org/v2.31/docs/reference-ipython#ignore_cwd

Default: true
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-ipython#install_from_resolve

Default: null
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-ipython#requirements

Default:
[]
jar_tool object

The Java Archive Tool

4 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-jar_tool#artifacts

Default:
[
  "args4j:args4j:2.33",
  "com.google.code.findbugs:jsr305:3.0.2",
  "com.google.guava:guava:18.0"
]
jvm_options array

List of JVM options to pass to jar_tool JVM processes https://www.pantsbuild.org/v2.31/docs/reference-jar_tool#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-jar_tool#lockfile

Default: "<default>"
version string
Default: null
jarjar object

The Jar Jar Abrams tool (https://github.com/eed3si9n/jarjar-abrams)

6 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-jarjar#artifacts

Default:
[
  "com.eed3si9n.jarjar:jarjar-assembly:{version}"
]
jvm_options array

List of JVM options to pass to jarjar JVM processes https://www.pantsbuild.org/v2.31/docs/reference-jarjar#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-jarjar#lockfile

Default: "<default>"
misplaced_class_strategy enum

The strategy to use when processing class files that are in the wrong package https://www.pantsbuild.org/v2.31/docs/reference-jarjar#misplaced_class_strategy

Default: null
Values: "fatal" "skip" "omit" "move"
skip_manifest boolean
Default: false
version string
Default: "1.8.1"
java-dump-source-analysis object

Dump source analysis for java_source[s] targets.

java-infer object

Options controlling which dependencies will be inferred for Java targets.

3 nested properties
consumed_types boolean

Infer a target's dependencies by parsing consumed types from sources https://www.pantsbuild.org/v2.31/docs/reference-java-infer#consumed_types

Default: true
imports boolean

Infer a target's dependencies by parsing import statements from sources https://www.pantsbuild.org/v2.31/docs/reference-java-infer#imports

Default: true
third_party_import_mapping object

A dictionary mapping a Java package path to a JVM artifact coordinate (GROUP:ARTIFACT) without the version https://www.pantsbuild.org/v2.31/docs/reference-java-infer#third_party_import_mapping

Default:
{}
java-parser object

Internal tool for parsing JVM sources to identify dependencies

4 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-java-parser#artifacts

Default:
[
  "com.fasterxml.jackson.core:jackson-databind:2.12.4",
  "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.4",
  "com.github.javaparser:javaparser-symbol-solver-core:3.25.5"
]
jvm_options array

List of JVM options to pass to java-parser JVM processes https://www.pantsbuild.org/v2.31/docs/reference-java-parser#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-java-parser#lockfile

Default: "<default>"
version string
Default: null
javac object

The javac Java source compiler.

2 nested properties
args array

Arguments to pass directly to javac, e.g. --javac-args='-g -deprecation' https://www.pantsbuild.org/v2.31/docs/reference-javac#args

Default:
[]
tailor_source_targets boolean

If true, add java_sources and java_tests targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-javac#tailor_source_targets

Default: true
junit object

The JUnit test framework (https://junit.org)

6 nested properties
args array

Arguments to pass directly to JUnit, e.g. --junit-args='--disable-ansi-colors' https://www.pantsbuild.org/v2.31/docs/reference-junit#args

Default:
[]
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-junit#artifacts

Default:
[
  "org.junit.platform:junit-platform-console:1.7.2",
  "org.junit.jupiter:junit-jupiter-engine:{version}",
  "org.junit.vintage:junit-vintage-engine:{version}"
]
jvm_options array

List of JVM options to pass to junit JVM processes https://www.pantsbuild.org/v2.31/docs/reference-junit#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-junit#lockfile

Default: "<default>"
skip boolean

If true, don't use JUnit when running pants test https://www.pantsbuild.org/v2.31/docs/reference-junit#skip

Default: false
version string
Default: "5.7.2"
jvm object

Options for general JVM functionality.

JDK strings will be passed directly to Coursier's --jvm parameter. Run cs java --available to see a list of available JVM versions on your platform.

If the string 'system' is passed, Coursier's --system-jvm option will be used instead, but note that this can lead to inconsistent behavior since the JVM version will be whatever happens to be found first on the system's PATH.

9 nested properties
debug_args array

Extra JVM arguments to use when running tests in debug mode https://www.pantsbuild.org/v2.31/docs/reference-jvm#debug_args

Default:
[]
default_resolve string

The default value used for the resolve and compatible_resolves fields https://www.pantsbuild.org/v2.31/docs/reference-jvm#default_resolve

Default: "jvm-default"
deploy_jar_exclude_files array

A list of patterns to exclude from all deploy jars https://www.pantsbuild.org/v2.31/docs/reference-jvm#deploy_jar_exclude_files

Default:
[
  "^META-INF/[^/]+\\.SF$",
  "^META-INF/[^/]+\\.DSA$",
  "^META-INF/[^/]+\\.RSA$",
  "META-INF/INDEX.LIST$"
]
global_options array

List of JVM options to pass to all JVM processes https://www.pantsbuild.org/v2.31/docs/reference-jvm#global_options

Default:
[]
jdk string
Default: "temurin:1.11"
nailgun_remote_cache_speculation_delay number

The time in milliseconds to delay speculation of nailgun processes while reading from the remote cache https://www.pantsbuild.org/v2.31/docs/reference-jvm#nailgun_remote_cache_speculation_delay

Default: 1000
reproducible_jars boolean

When enabled, JAR files produced by JVM tools will have timestamps stripped https://www.pantsbuild.org/v2.31/docs/reference-jvm#reproducible_jars

Default: false
resolves object

A dictionary mapping resolve names to the path of their lockfile https://www.pantsbuild.org/v2.31/docs/reference-jvm#resolves

Default:
{
  "jvm-default": "3rdparty/jvm/default.lock"
}
tool_jdk string

The JDK to use when building and running Pants' internal JVM support code and other non-compiler tools https://www.pantsbuild.org/v2.31/docs/reference-jvm#tool_jdk

Default: "temurin:1.11"
jvm-symbol-map object

Dump the JVM dependency inference symbol mapping.

lint object

Run linters/formatters/fixers in check mode.

This goal runs tools that check code quality/styling etc, without changing that code. This includes running formatters and fixers, but instead of writing changes back to the workspace, Pants treats any changes they would make as a linting failure.

See also:

  • [The fmt goal](https://www.pantsbuild.org/2.31/reference/goals/fix will save the the result of formatters (code-editing tools that make only "syntactic" changes) back to the workspace.

  • [The fmt goal](https://www.pantsbuild.org/2.31/reference/goals/fix will save the the result of fixers (code-editing tools that may make "semantic" changes too) back to the workspace.

  • Documentation about linters for various ecosystems, such as: Python, Go, JVM, Shell, Docker.

4 nested properties
batch_size number

The target number of files to be included in each linter batch https://www.pantsbuild.org/v2.31/docs/reference-lint#batch_size

Default: 128
only array

Only run these linters and skip all others https://www.pantsbuild.org/v2.31/docs/reference-lint#only

Default:
[]
skip_fixers boolean

If true, skip running all fixers in check-only mode https://www.pantsbuild.org/v2.31/docs/reference-lint#skip_fixers

Default: false
skip_formatters boolean

If true, skip running all formatters in check-only mode https://www.pantsbuild.org/v2.31/docs/reference-lint#skip_formatters

Default: false
list object

Lists all targets matching the file or target arguments.

3 nested properties
documented boolean

Print only targets that are documented with a description https://www.pantsbuild.org/v2.31/docs/reference-list#documented

Default: false
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-list#sep

Default: "\n"
migrate-call-by-name object

Migrate from Get syntax to call-by-name syntax (#19730). This is a destructive operation, so only run this on source controlled files that you are prepared to revert if necessary.

This goal will attempt to migrate the set of paths/targets specified at the command line if they are part of the "migration plan". This migration does not add any new files, but instead modifies existing files in-place without any formatting. The resulting changes should be reviewed, tested, and formatted/linted before committing.

The migration plan is a JSON representation of the rule graph, which is generated by the engine based on the active backends/rules in the project.

Each item in the migration plan is a rule that contains the old Get syntax, the associated input/output types, and the new function to directly call. The migration plan can be dumped as JSON using the --json flag, which can be useful for debugging. For example:

{ "filepath": "src/python/pants/source/source_root.py", "function": "get_source_roots", "gets": [{ "input_types": [{ "module": "pants.source.source_root", "name": "SourceRootsRequest" }], "output_type": { "module": "pants.source.source_root", "name": "OptionalSourceRootsResult" }, "rule_dep": { "function": "get_optional_source_roots", "module": "pants.source.source_root" } }], "module": "pants.source.source_root" }

1 nested properties
json boolean
Default: false
mypy object

The MyPy Python type checker (http://mypy-lang.org/).

This version of Pants uses mypy version 1.18.2 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

10 nested properties
args array

Arguments to pass directly to MyPy, e.g. --mypy-args='--python-version 3.7 --disallow-any-expr' https://www.pantsbuild.org/v2.31/docs/reference-mypy#args

Default:
[]
config

Path to a config file understood by MyPy (https://mypy.readthedocs.io/en/stable/config_file.html) https://www.pantsbuild.org/v2.31/docs/reference-mypy#config

Default: null
config_discovery boolean

If true, Pants will include any relevant config files during runs (mypy.ini, .mypy.ini, and setup.cfg) https://www.pantsbuild.org/v2.31/docs/reference-mypy#config_discovery

Default: true
console_script string
Default: "mypy"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-mypy#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-mypy#requirements

Default:
[]
skip boolean

If true, don't use MyPy when running pants check https://www.pantsbuild.org/v2.31/docs/reference-mypy#skip

Default: false
source_plugins array

An optional list of python_sources target addresses to load first-party plugins https://www.pantsbuild.org/v2.31/docs/reference-mypy#source_plugins

Default:
[]
nodejs object

The Node.js Javascript runtime (including Corepack).

13 nested properties
corepack_env_vars array

Environment variables to set for corepack invocations https://www.pantsbuild.org/v2.31/docs/reference-nodejs#corepack_env_vars

Default:
[]
executable_search_paths array

The PATH value that will be used to find any tools required to run nodejs processes https://www.pantsbuild.org/v2.31/docs/reference-nodejs#executable_search_paths

Default:
[
  "<PATH>"
]
extra_env_vars array

Environment variables to set during package manager operations https://www.pantsbuild.org/v2.31/docs/reference-nodejs#extra_env_vars

Default:
[]
known_versions array
Default:
[
  "v24.10.0|macos_arm64|fbc3d6e1e1d962450d058e918214373872cc4c46e08673f31c35932afac4a8c5|51169103",
  "v24.10.0|macos_x86_64|627b884f66db0dd35f4b46fb9e994774ce560a7fb60798ba1ab81e867a73687d|52347633",
  "v24.10.0|linux_arm64|07f0558316ebb8977dd6fb29b4de8d369a639d3d8cef544293852a6f5eea6af8|31020300",
  "v24.10.0|linux_x86_64|2642f4428869aca32443660fd71b3918e2be1277a899bdcaeb64c93b54b5af17|32102040"
]
optional_tools array

List any additional executable which are not mandatory for node processes to work, but which should be included if available https://www.pantsbuild.org/v2.31/docs/reference-nodejs#optional_tools

Default:
[]
package_manager string
Default: "npm"
package_managers object

A mapping of package manager versions to semver releases https://www.pantsbuild.org/v2.31/docs/reference-nodejs#package_managers

Default:
{
  "npm": "11.6.2",
  "pnpm": "10.19.0",
  "yarn": "1.22.22"
}
resolves object

A mapping of names to lockfile paths used in your project https://www.pantsbuild.org/v2.31/docs/reference-nodejs#resolves

Default:
{}
search_path array

A list of paths to search for Node.js distributions https://www.pantsbuild.org/v2.31/docs/reference-nodejs#search_path

Default:
[
  "<PATH>"
]
tools array

List any additional executable tools required for node processes to work https://www.pantsbuild.org/v2.31/docs/reference-nodejs#tools

Default:
[]
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-nodejs#url_platform_mapping

Default:
{
  "linux_arm64": "linux-arm64",
  "linux_x86_64": "linux-x64",
  "macos_arm64": "darwin-arm64",
  "macos_x86_64": "darwin-x64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-nodejs#url_template

Default: "https://nodejs.org/dist/{version}/node-{version}-{platform}.tar"
version string
Default: "v24.10.0"
nodejs-infer object

Options controlling which dependencies will be inferred for javascript targets.

3 nested properties
imports boolean

Infer a target's imported dependencies by parsing import statements from sources https://www.pantsbuild.org/v2.31/docs/reference-nodejs-infer#imports

Default: true
package_json_entry_points boolean

Infer a package_json's dependencies by parsing entry point statements from the package.json file https://www.pantsbuild.org/v2.31/docs/reference-nodejs-infer#package_json_entry_points

Default: true
unowned_dependency_behavior enum
Default: "warning"
Values: "error" "warning" "ignore"
nodejs-test object

Options for package.json script configured tests.

Your preferred test runner is configured via the package.json#scripts.test field.

The only expectation from pants is that the test script can accept a variadic number of path arguments, relative to the package.json, and that any configuration files are file dependencies to the package_json.

Simple example:

Consider a directory-layout:

├── BUILD
├── src/
│   ├── BUILD
│   ├── test/
│   │   ├── BUILD
│   │   └── index.test.js
│   └── index.js
└── package.json

where package.json contains

{
    ...
    "scripts": {
        "test": "mocha"
    },
    "devDependencies: {
        ...
    }
}

Executing pants test src/test/index.test.js will cause the equivalent of mocha src/test/index.test.js to run.

2 nested properties
coverage_output_dir string
Default: "{distdir}/coverage/js/{target_spec}"
skip boolean

If true, don't use Node.js tests when running pants test https://www.pantsbuild.org/v2.31/docs/reference-nodejs-test#skip

Default: false
package object

Create a distributable package.

paths object

List the paths between two addresses. Either address may represent a group of targets, e.g. --from=src/app/main.py --to=src/library::.

3 nested properties
from string
Default: null
output_file string
Default: null
to string
Default: null
peek object

Display BUILD target info

4 nested properties
exclude_defaults boolean

Whether to leave off values that match the target-defined default values https://www.pantsbuild.org/v2.31/docs/reference-peek#exclude_defaults

Default: false
include_additional_info boolean

Whether to include additional information generated by plugins https://www.pantsbuild.org/v2.31/docs/reference-peek#include_additional_info

Default: false
include_dep_rules boolean

Whether to include _dependencies_rules, _dependents_rules and _applicable_dep_rules that apply to the target and its dependencies https://www.pantsbuild.org/v2.31/docs/reference-peek#include_dep_rules

Default: false
output_file string
Default: null
pex object

How Pants uses Pex to run Python subprocesses.

4 nested properties
emit_warnings boolean

If warnings from Pex should be logged by Pants to the console https://www.pantsbuild.org/v2.31/docs/reference-pex#emit_warnings

Default: false
executable_search_paths array

The PATH value that will be used by the PEX subprocess and any subprocesses it spawns https://www.pantsbuild.org/v2.31/docs/reference-pex#executable_search_paths

Default:
[
  "<PATH>"
]
venv_use_symlinks boolean

When possible, use venvs whose site-packages directories are populated with symlinks https://www.pantsbuild.org/v2.31/docs/reference-pex#venv_use_symlinks

Default: false
verbosity number

Set the verbosity level of PEX logging, from 0 (no logging) up to 9 (max logging) https://www.pantsbuild.org/v2.31/docs/reference-pex#verbosity

Default: 0
pex-binary-defaults object

Default settings for creating PEX executables.

1 nested properties
emit_warnings boolean

Whether built PEX binaries should emit PEX warnings at runtime by default https://www.pantsbuild.org/v2.31/docs/reference-pex-binary-defaults#emit_warnings

Default: true
pex-cli object

The PEX (Python EXecutable) tool (https://github.com/pex-tool/pex).

6 nested properties
global_args array

Arguments to pass directly to pex, e.g. --pex-cli-args='--check=error --no-compile' https://www.pantsbuild.org/v2.31/docs/reference-pex-cli#global_args

Default:
[]
known_versions array
Default:
[
  "v2.81.0|macos_x86_64|654c561d4fc2b833f1ed6b23cf9251eb7dab812b12deaac365d7150afd96fca5|4945588",
  "v2.81.0|macos_arm64|654c561d4fc2b833f1ed6b23cf9251eb7dab812b12deaac365d7150afd96fca5|4945588",
  "v2.81.0|linux_x86_64|654c561d4fc2b833f1ed6b23cf9251eb7dab812b12deaac365d7150afd96fca5|4945588",
  "v2.81.0|linux_arm64|654c561d4fc2b833f1ed6b23cf9251eb7dab812b12deaac365d7150afd96fca5|4945588"
]
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-pex-cli#url_platform_mapping

Default:
{}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-pex-cli#url_template

Default: "https://github.com/pex-tool/pex/releases/download/{version}/pex"
use_unsupported_version enum

What action to take in case the requested version of pex is not supported https://www.pantsbuild.org/v2.31/docs/reference-pex-cli#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "v2.81.0"
preamble object

Formats files with a preamble, with the preamble looked up based on path.

This is useful for things such as copyright headers or shebang lines.

Pants substitutes the following identifiers (following Python's string.Template substitutions): - $year: The current year (only used when actually writing the year to the file).

2 nested properties
skip boolean

If true, don't use preamble when running pants fmt https://www.pantsbuild.org/v2.31/docs/reference-preamble#skip

Default: false
template_by_globs object | string

Which preamble template to use based on the path globs (relative to the build root) https://www.pantsbuild.org/v2.31/docs/reference-preamble#template_by_globs

Default:
{}
prettier object

The Prettier utility for formatting JS/TS (and others) code (https://prettier.io/).

5 nested properties
args array

Arguments to pass directly to Prettier, e.g. --prettier-args='--version' https://www.pantsbuild.org/v2.31/docs/reference-prettier#args

Default:
[]
binary_name string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve, instead of the version configured in this subsystem https://www.pantsbuild.org/v2.31/docs/reference-prettier#install_from_resolve

Default: null
skip boolean

If true, don't use Prettier when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-prettier#skip

Default: false
version string

Version string for the tool in the form package@version (e.g. [email protected]) https://www.pantsbuild.org/v2.31/docs/reference-prettier#version

Default: "[email protected]"
publish object

Publish deliverables (assets, distributions, images, etc).

2 nested properties
noninteractive_process_output enum

Show stdout/stderr when publishing with noninteractively https://www.pantsbuild.org/v2.31/docs/reference-publish#noninteractive_process_output

Default: "all"
Values: "all" "failed" "none"
output string

Filename for JSON structured publish information https://www.pantsbuild.org/v2.31/docs/reference-publish#output

Default: null
py-constraints object

Determine what Python interpreter constraints are used by files/targets.

2 nested properties
output_file string
Default: null
summary boolean

Output a CSV summary of interpreter constraints for your whole repository https://www.pantsbuild.org/v2.31/docs/reference-py-constraints#summary

Default: false
pyoxidizer object

The PyOxidizer utility for packaging Python code in a Rust binary (https://pyoxidizer.readthedocs.io/en/stable/pyoxidizer.html).

Used with the pyoxidizer_binary target.

This version of Pants uses pyoxidizer version 0.24.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

6 nested properties
args array

Arguments to pass directly to PyOxidizer, e.g. --pyoxidizer-args='--release' https://www.pantsbuild.org/v2.31/docs/reference-pyoxidizer#args

Default:
[]
console_script string
Default: "pyoxidizer"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-pyoxidizer#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-pyoxidizer#requirements

Default:
[]
pytest object

The pytest Python test framework (https://docs.pytest.org/).

This version of Pants uses pytest version 8.4.2 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

12 nested properties
allow_empty_test_collection boolean

If true, treat pytest exit code 5 ("No tests were collected") as success https://www.pantsbuild.org/v2.31/docs/reference-pytest#allow_empty_test_collection

Default: false
args array

Arguments to pass directly to Pytest, e.g. --pytest-args='-k test_foo --quiet' https://www.pantsbuild.org/v2.31/docs/reference-pytest#args

Default:
[]
config

Path to a config file understood by Pytest (https://docs.pytest.org/en/latest/reference/customize.html#configuration-file-formats) https://www.pantsbuild.org/v2.31/docs/reference-pytest#config

Default: null
config_discovery boolean

If true, Pants will include all relevant Pytest config files (e.g. pytest.ini) during runs https://www.pantsbuild.org/v2.31/docs/reference-pytest#config_discovery

Default: true
console_script string
Default: "pytest"
entry_point string
Default: null
execution_slot_var string

If a non-empty string, the process execution slot id (an integer) will be exposed to tests under this environment variable name https://www.pantsbuild.org/v2.31/docs/reference-pytest#execution_slot_var

Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-pytest#install_from_resolve

Default: null
junit_family string
Default: "xunit2"
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-pytest#requirements

Default:
[]
skip boolean

If true, don't use Pytest when running pants test https://www.pantsbuild.org/v2.31/docs/reference-pytest#skip

Default: false
xdist_enabled boolean

If true, Pants will use pytest-xdist (https://pytest-xdist.readthedocs.io/en/latest/) to parallelize tests within each python_test target https://www.pantsbuild.org/v2.31/docs/reference-pytest#xdist_enabled

Default: false
python object

Options for Pants's Python backend.

31 nested properties
default_resolve string
Default: "python-default"
default_run_goal_use_sandbox boolean

The default value used for the run_goal_use_sandbox field of Python targets https://www.pantsbuild.org/v2.31/docs/reference-python#default_run_goal_use_sandbox

Default: true
default_to_resolve_interpreter_constraints boolean

For Python targets with both resolve and interpreter_constraints fields, default to using the interpreter_constraints field of the resolve if interpreter_constraints is not set on the target itself https://www.pantsbuild.org/v2.31/docs/reference-python#default_to_resolve_interpreter_constraints

Default: false
enable_lockfile_targets boolean

Create targets for all Python lockfiles defined in [python].resolves https://www.pantsbuild.org/v2.31/docs/reference-python#enable_lockfile_targets

Default: true
enable_resolves boolean

Set to true to enable lockfiles for user code https://www.pantsbuild.org/v2.31/docs/reference-python#enable_resolves

Default: false
interpreter_constraints array

The Python interpreters your codebase is compatible with https://www.pantsbuild.org/v2.31/docs/reference-python#interpreter_constraints

Default:
[]
interpreter_versions_universe array

All known Python major/minor interpreter versions that may be used by either your code or tools used by your code https://www.pantsbuild.org/v2.31/docs/reference-python#interpreter_versions_universe

Default:
[
  "2.7",
  "3.5",
  "3.6",
  "3.7",
  "3.8",
  "3.9",
  "3.10",
  "3.11",
  "3.12",
  "3.13"
]
invalid_lockfile_behavior enum

The behavior when a lockfile has requirements or interpreter constraints that are not compatible with what the current build is using https://www.pantsbuild.org/v2.31/docs/reference-python#invalid_lockfile_behavior

Default: "error"
Values: "error" "ignore" "warn"
macos_big_sur_compatibility boolean

If set, and if running on macOS Big Sur, use macosx_10_16 as the platform when building wheels https://www.pantsbuild.org/v2.31/docs/reference-python#macos_big_sur_compatibility

Default: false
pip_version string

Use this version of Pip for resolving requirements and generating lockfiles https://www.pantsbuild.org/v2.31/docs/reference-python#pip_version

Default: "24.2"
repl_history boolean

Whether to use the standard Python command history file when running a repl https://www.pantsbuild.org/v2.31/docs/reference-python#repl_history

Default: true
resolver_manylinux string

Whether to allow resolution of manylinux wheels when resolving requirements for foreign linux platforms https://www.pantsbuild.org/v2.31/docs/reference-python#resolver_manylinux

Default: "manylinux2014"
resolves object

A mapping of logical names to lockfile paths used in your project https://www.pantsbuild.org/v2.31/docs/reference-python#resolves

Default:
{
  "python-default": "3rdparty/python/default.lock"
}
resolves_generate_lockfiles boolean

If False, Pants will not attempt to generate lockfiles for [python].resolves when running the generate-lockfiles goal https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_generate_lockfiles

Default: true
resolves_to_complete_platforms object

The platforms the built PEX should be compatible with when generating lockfiles https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_complete_platforms

Default:
{}
resolves_to_constraints_file object

When generating a resolve's lockfile, use a constraints file to pin the version of certain requirements https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_constraints_file

Default:
{}
resolves_to_excludes object

Specifies requirements to exclude from a resolve and its https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_excludes

Default:
{}
resolves_to_interpreter_constraints object

Override the interpreter constraints to use when generating a resolve's lockfile with the generate-lockfiles goal https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_interpreter_constraints

Default:
{}
resolves_to_lock_style object
Default:
{}
resolves_to_no_binary object

When generating a resolve's lockfile, do not use binary packages (i.e. wheels) for these 3rdparty project names https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_no_binary

Default:
{}
resolves_to_only_binary object

When generating a resolve's lockfile, do not use source packages (i.e. sdists) for these 3rdparty project names, e.g ['django', 'requests'] https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_only_binary

Default:
{}
resolves_to_overrides object

Specifies a transitive requirement to override in a resolve https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_overrides

Default:
{}
resolves_to_sources object

Defines a limited scope to use a named find links repo or https://www.pantsbuild.org/v2.31/docs/reference-python#resolves_to_sources

Default:
{}
run_against_entire_lockfile boolean

If enabled, when running binaries, tests, and repls, Pants will use the entire lockfile file instead of just the relevant subset https://www.pantsbuild.org/v2.31/docs/reference-python#run_against_entire_lockfile

Default: false
separate_lockfile_metadata_file boolean

If set, lockfile metadata will be written to a separate sibling file, rather than prepended as a header to the lockfile (which has various disadvantages) https://www.pantsbuild.org/v2.31/docs/reference-python#separate_lockfile_metadata_file

Default: false
tailor_ignore_empty_init_files boolean

If true, don't add python_sources targets for __init__.py files that are both empty and where there are no other Python files in the directory https://www.pantsbuild.org/v2.31/docs/reference-python#tailor_ignore_empty_init_files

Default: true
tailor_pex_binary_targets boolean

If true, add pex_binary targets for Python files named __main__.py or with a __main__ clause with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-python#tailor_pex_binary_targets

Default: false
tailor_py_typed_targets boolean

If true, add resource targets for marker files named py.typed with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-python#tailor_py_typed_targets

Default: true
tailor_requirements_targets boolean

If true, add python_requirements, poetry_requirements, and pipenv_requirements target generators with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-python#tailor_requirements_targets

Default: true
tailor_source_targets boolean

If true, add python_sources, python_tests, and python_test_utils targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-python#tailor_source_targets

Default: true
warn_on_python2_usage boolean

True if Pants should generate a deprecation warning when Python 2.x is used in interpreter constraints https://www.pantsbuild.org/v2.31/docs/reference-python#warn_on_python2_usage

Default: true
python-bootstrap object

Options used to locate Python interpreters.

This subsystem controls where and how Pants will locate Python, but beyond that it does not control which Python interpreter versions are actually used for your code: see the python subsystem for that.

3 nested properties
internal_python_build_standalone_info object

A map from platform to the information needed to download Python Build Standalone https://www.pantsbuild.org/v2.31/docs/reference-python-bootstrap#internal_python_build_standalone_info

Default:
{
  "linux_arm64": [
    "https://github.com/astral-sh/python-build-standalone/releases/download/20241008/cpython-3.11.10+20241008-aarch64-unknown-linux-gnu-install_only.tar.gz",
    "320635e957e13d2e10d70a3031563d032fae9e40e60e5ec32bc353643fae1335",
    25925875
  ],
  "linux_x86_64": [
    "https://github.com/astral-sh/python-build-standalone/releases/download/20241008/cpython-3.11.10+20241008-x86_64-unknown-linux-gnu-install_only.tar.gz",
    "ff121f14ed113c9da83a45f76c3cf41976fb4419fe406d5cc7066765761c6a4e",
    29716764
  ],
  "macos_arm64": [
    "https://github.com/astral-sh/python-build-standalone/releases/download/20241008/cpython-3.11.10+20241008-aarch64-apple-darwin-install_only.tar.gz",
    "ecdc9c042b8f97bff211fcf9425bc51c96acd4037df1565964e89816f2c9564d",
    17795541
  ],
  "macos_x86_64": [
    "https://github.com/astral-sh/python-build-standalone/releases/download/20241008/cpython-3.11.10+20241008-x86_64-apple-darwin-install_only.tar.gz",
    "a618c086e0514f681523947e2b66a4dc0c6560f91c36faa072fa6787455df9ea",
    18165701
  ]
}
names array
Default:
[
  "python",
  "python3"
]
search_path array

A list of paths to search for Python interpreters https://www.pantsbuild.org/v2.31/docs/reference-python-bootstrap#search_path

Default:
[
  "<PYENV>",
  "<ASDF>",
  "<PATH>"
]
python-dump-source-analysis object

Dump source analysis for python_source targets.

1 nested properties
analysis_flavor enum
Default: "dependency_inference"
Values: "raw_dependency_inference" "dependency_inference"
python-infer object

Options controlling which dependencies will be inferred for Python targets.

12 nested properties
ambiguity_resolution enum

When multiple sources provide the same symbol, how to choose the provider to use https://www.pantsbuild.org/v2.31/docs/reference-python-infer#ambiguity_resolution

Default: "none"
Values: "none" "by_source_root"
assets boolean

Infer a target's asset dependencies based on strings that look like Posix filepaths, such as those given to open or pkgutil.get_data https://www.pantsbuild.org/v2.31/docs/reference-python-infer#assets

Default: false
assets_min_slashes number

If --assets is True, treat valid-looking strings with at least this many forward slash characters as potential assets https://www.pantsbuild.org/v2.31/docs/reference-python-infer#assets_min_slashes

Default: 1
conftests boolean

Infer a test target's dependencies on any conftest.py files in the current directory and ancestor directories https://www.pantsbuild.org/v2.31/docs/reference-python-infer#conftests

Default: true
entry_points boolean

Infer dependencies on targets' entry points, e.g. pex_binary's entry_point field, python_aws_lambda_function's handler field and python_distribution's entry_points field https://www.pantsbuild.org/v2.31/docs/reference-python-infer#entry_points

Default: true
ignored_unowned_imports array
Default:
[]
imports boolean

Infer a target's imported dependencies by parsing import statements from sources https://www.pantsbuild.org/v2.31/docs/reference-python-infer#imports

Default: true
init_files enum

Infer a target's dependencies on any __init__.py files in the packages it is located in (recursively upward in the directory structure) https://www.pantsbuild.org/v2.31/docs/reference-python-infer#init_files

Default: "content_only"
Values: "always" "content_only" "never"
string_imports boolean

Infer a target's dependencies based on strings that look like dynamic dependencies, such as Django settings files expressing dependencies as strings or pytest plugins listed in the pytest_plugins variable in a test module or a conftest file https://www.pantsbuild.org/v2.31/docs/reference-python-infer#string_imports

Default: false
string_imports_min_dots number

If --string-imports is True, treat valid-looking strings with at least this many dots in them as potential dynamic dependencies https://www.pantsbuild.org/v2.31/docs/reference-python-infer#string_imports_min_dots

Default: 2
unowned_dependency_behavior enum
Default: "warning"
Values: "error" "warning" "ignore"
use_rust_parser boolean

Use the new Rust-based, multithreaded, in-process dependency parser https://www.pantsbuild.org/v2.31/docs/reference-python-infer#use_rust_parser

Default: true
python-native-code object

Options for building native code using Python, e.g. when resolving distributions.

2 nested properties
cpp_flags array

Override the CPPFLAGS environment variable for any forked subprocesses https://www.pantsbuild.org/v2.31/docs/reference-python-native-code#cpp_flags

Default:
[
  "<CPPFLAGS>"
]
ld_flags array

Override the LDFLAGS environment variable for any forked subprocesses https://www.pantsbuild.org/v2.31/docs/reference-python-native-code#ld_flags

Default:
[
  "<LDFLAGS>"
]
python-repos object

External Python code repositories, such as PyPI.

These options may be used to point to custom package indexes when resolving requirements.

3 nested properties
find_links array

URLs and/or file paths corresponding to pip's --find-links option https://www.pantsbuild.org/v2.31/docs/reference-python-repos#find_links

Default:
[]
indexes array

URLs of PEP-503 compatible code repository indexes to look for requirements https://www.pantsbuild.org/v2.31/docs/reference-python-repos#indexes

Default:
[
  "https://pypi.org/simple/"
]
path_mappings array

Mappings to facilitate using local Python requirements when the absolute file paths are different on different users' machines https://www.pantsbuild.org/v2.31/docs/reference-python-repos#path_mappings

Default:
[]
regex-lint object

Lint your code using regex patterns, e.g. to check for copyright headers.

To activate this with the lint goal, you must set [regex-lint].config.

Unlike other linters, this can run on files not owned by targets, such as BUILD files.

3 nested properties
config object | string
Default:
{}
detail_level enum
Default: "nonmatching"
Values: "none" "summary" "nonmatching" "names" "all"
skip boolean

If true, don't use regex-lint when running pants lint https://www.pantsbuild.org/v2.31/docs/reference-regex-lint#skip

Default: false
repl object

Open a REPL with the specified code loadable.

3 nested properties
args array

Arguments to pass directly to the repl program, e.g. --repl-args='-i helloworld/main.py' https://www.pantsbuild.org/v2.31/docs/reference-repl#args

Default:
[]
restartable boolean

True if the REPL should be restarted if its inputs have changed https://www.pantsbuild.org/v2.31/docs/reference-repl#restartable

Default: false
shell string

Override the automatically-detected REPL program for the target(s) specified https://www.pantsbuild.org/v2.31/docs/reference-repl#shell

Default: null
roots object

List the repo's registered source roots.

2 nested properties
output_file string
Default: null
sep string

String to use to separate lines in line-oriented output https://www.pantsbuild.org/v2.31/docs/reference-roots#sep

Default: "\n"
ruff object

The Ruff Python formatter (https://github.com/astral-sh/ruff).

9 nested properties
args array

Arguments to pass directly to Ruff, e.g. --ruff-args='--exclude=foo --ignore=E501' https://www.pantsbuild.org/v2.31/docs/reference-ruff#args

Default:
[]
config

Path to the pyproject.toml or ruff.toml file to use for configuration (https://github.com/astral-sh/ruff#configuration) https://www.pantsbuild.org/v2.31/docs/reference-ruff#config

Default: null
config_discovery boolean

If true, Pants will include any relevant config files during runs (pyproject.toml, and ruff.toml) https://www.pantsbuild.org/v2.31/docs/reference-ruff#config_discovery

Default: true
known_versions array
Default:
[
  "0.13.0|macos_x86_64|ac47ad1ac90f3070c064d2f5fceef4fe609fec7c073fd29d0814ed126c492e6d|12924617",
  "0.13.0|macos_arm64|0d706798534537b6655b79fd95c2955c0a0013d4c54d36679d3306825a6bd6aa|12098971",
  "0.13.0|linux_x86_64|b56ac90cc6987401bafdcf1b931ef044074c5b9451286afa4606a983f64f4fdd|13437622",
  "0.13.0|linux_arm64|bdee6f1376470b74b1dc5ed48eca52ec9c3e4512bd7f3204e0df100f0bed4741|12137114",
  "0.12.5|macos_x86_64|5af0b2931581a5ed91743c9f669c23cb0db9bb1f0c49f8695ad1443dbc6a9e50|12478716",
  "0.12.5|macos_arm64|8819b61cff645c1d1671df331bb57c1ab230094b686942bccedde1f888feb522|11719060",
  "0.12.5|linux_x86_64|79beb4eac07beaea24774709eeb88a87115f1b53f857dcc1155431e642e01ade|12995071",
  "0.12.5|linux_arm64|f147ccdbe26d35f2752c6d97d158bc8e3b4d1833d283748fc48f350c698a6f7b|11787954",
  "0.11.13|macos_x86_64|8dcc61306472f75c07af6d0446060e26227d773cee319d21900ac3a1d7bc4955|11085786",
  "0.11.13|macos_arm64|7d5e8feea7ee5c3962807996cad557e8a0c4d676c1cba6223bfb0e8b2ca07723|10425890",
  "0.11.13|linux_x86_64|4540e8bc5b2af73c4b79e9e993724b044310eea4aa9003cf05ed4bdee6c25735|11609889",
  "0.11.13|linux_arm64|1ff8292d610302bc20791f6ab264de499b6d2fbf89030fef915908c564a78e82|10519905",
  "0.11.5|macos_x86_64|c28725c6421d5834b2cd16c7b13c3831b3363d6d558448d7dd3e0aa695551f94|10882726",
  "0.11.5|macos_arm64|4a5b1a44412bda817debb67d826a565f11b235744870b509f44102403a3a9e89|10228748",
  "0.11.5|linux_x86_64|067c1c6c4d6033b65fe788f5310075686110b286a102431fb19883c079e2fca1|11413549",
  "0.11.5|linux_arm64|77c11c7a70d3bf499915bab5a7691e955f4127164c4cfb7ef4e0773892ed2509|10318966",
  "0.11.0|macos_x86_64|a208dee9c1a7a063dace746836fd2d7e5f7694d2142700d3964fccf141ada555|10861900",
  "0.11.0|macos_arm64|09ea313f2aab3844432b46c6c5e3e066b26ae4953f4bac1e545176e5dea22306|10239274",
  "0.11.0|linux_x86_64|3148cd8131ec4f525551b16a57186f5533c705950269cbee7674d484ca6eefe5|11412993",
  "0.11.0|linux_arm64|60904d6d51b1a8dd49ab948dd1de33ce439ca872c82faa5dab90fce838539317|10313237",
  "0.10.0|macos_x86_64|2388af7881c7e50026388e953fa6eab7c1ae94c868926a6185c3cb38f9f15aa2|10862770",
  "0.10.0|macos_arm64|1da279b8302cd86f50d38fc8ad62cd12f4d07c0c402c13a3bac7dc244c7db138|10224628",
  "0.10.0|linux_x86_64|5e949f667a1dd76ab4382ba713fed3390ddc6088147ba0eb70fd8aa2ec564751|11399512",
  "0.10.0|linux_arm64|7b9fe2e2cecde897fb35a1a0bb1ccd10dde3395acd81aea7e5e6b0b24824e7c7|10305951",
  "0.9.10|macos_x86_64|1e5080489fdf483e7111bb1575f045ec13da2fdbfc6ac5fd58b5d55cf9cd7668|10838186",
  "0.9.10|macos_arm64|1fccbd53431eaa596f2322494edbdc444f99db651566188fa0a9820c26bbef77|10147621",
  "0.9.10|linux_x86_64|15e93ee078beb5ec24d1afb02a1cce2a873ac627d378c987adda4f6ab3b5f886|11373081",
  "0.9.10|linux_arm64|c131df77457ed45aa44b617194563ceea2e29e595c42d06804e04155529423b4|10245226",
  "0.9.6|macos_x86_64|ec88c095036b25e95391ea202fcc9496d565f4e43152db10785eb9757ea0815d|11663591",
  "0.9.6|macos_arm64|a3132eb5e3d95f36d378144082276fbed0309789dadb19d8a4c41ec5e80451fb|11124436",
  "0.9.6|linux_x86_64|c725f57aa11d636f1d7f0f378c604d4db29c4dbb5ff0578f9fbbc578364875df|12568611",
  "0.9.6|linux_arm64|8f64e97deae1c12f659fd13e6e14d78cf15ed876d1548ac76b235f78ab5803e1|11929444",
  "0.8.6|macos_x86_64|3ff48d180472a1aee6385ba43606ba6a5a6ab89f16a3ca8ccb234966fe3698c1|10374010",
  "0.8.6|macos_arm64|d24cfe247de2bfd90d7f0604196247b680e1db5b6c8427cf6e540c38044526f7|10005432",
  "0.8.6|linux_x86_64|a691c78f045f7202b15620939c4b087f301afe884e42d09a19725f61581aa887|11329234",
  "0.8.6|linux_arm64|23c5d1dd7eed23d2bd6d340df05a068030e267db28150892a72e3dc97b175164|10868993",
  "0.7.4|macos_x86_64|9762afafafacd801eb95a086dcd3359075ab5cc4cd1371b7ff0550c44ac4e47c|10223356",
  "0.7.4|macos_arm64|af9583bff12afbca5d5670334e0187dd60c4d91bc71317d1b2dde70cb1200ba9|9882883",
  "0.7.4|linux_x86_64|38ff38639f33764acf2cf3c3252e2a214b7f5fedafa67c50909926297dba9229|11172665",
  "0.7.4|linux_arm64|329ddf6bb4f34fbcba273ecb1460280aa2ad92150a94f58110861b3c4453ce35|10703090",
  "0.7.2|macos_x86_64|5815756947d0a7b1d90805b07ffb2c376c8a9800e9462d545839dc0d79a091d2|10162492",
  "0.7.2|macos_arm64|1c9f5a4fc815330d01fd8a56a7a70114ff3ed149bd997ff831524313705ba991|9802953",
  "0.7.2|linux_x86_64|b769e11a3e23a72692cb97ed762ff28e48534972a8ef447fd5b0d3178a56ffd8|11097578",
  "0.7.2|linux_arm64|f9342fcca6b58143f316ef3e617f39334edb4c3d15fced5220bd939685f6261d|10651691",
  "0.6.9|macos_x86_64|34aa37643e30dcb81a3c0e011c3a8df552465ea7580ba92ca727a3b7c6de25d1|10018168",
  "0.6.9|macos_arm64|b94562393a4bf23f1a48521f5495a8e48de885b7c173bd7ea8206d6d09921633|9697031",
  "0.6.9|linux_x86_64|39a1cd878962ebc88322b4f6d33cae2292454563028f93a3f1f8ce58e3025b07|11000553",
  "0.6.9|linux_arm64|73df3729a3381d0918e4640aac4b2653c542f74c7b7843dee8310e2c877e6f2e|10724239",
  "0.6.4|macos_x86_64|4438cbc80c6aa0e839abc3abb2a869a27113631cb40aa26540572fb53752c432|9463378",
  "0.6.4|macos_arm64|2648dd09984c82db9f3163ce8762c89536e4bf0e198f17e06a01c0e32214273e|9167424",
  "0.6.4|linux_x86_64|3ca04aabf7259c59193e4153a865618cad26f73be930ce5f6109e0e6097d037b|10373921",
  "0.6.4|linux_arm64|a9157a0f062d62c1b1582284a8d10629503f38bc9b7126b614cb7569073180ff|10120541",
  "0.5.7|macos_x86_64|1f9a7d307f191781fc895947af21d32f8c810c5a5a4cdff16ac53d88a14acd69|8662539",
  "0.5.7|macos_arm64|b78a09f44dc60d8c894aba6cad55abd3b0eccc0992d60a86f74155fc459e227b|8256430",
  "0.5.7|linux_x86_64|9a5580536ef9cea7d8e56be8af712ac5cd152c081969ece2fbc3631b30bbb5e8|10263458",
  "0.5.7|linux_arm64|2509d20ef605fb1c8af37af1f46fefc85e1d72add6e87187cb6543420c05dfb1|9991080",
  "0.4.10|macos_x86_64|6e96f288d13b68863e79c9f107a0c51660215829726c9d3dc4879c1801fa3140|8490153|https://github.com/astral-sh/ruff/releases/download/v0.4.10/ruff-0.4.10-x86_64-apple-darwin.tar.gz",
  "0.4.10|macos_arm64|5a4ff81270eee1efa7901566719aca705a3e8d0f1abead96c01caa4678a7762e|8094319|https://github.com/astral-sh/ruff/releases/download/v0.4.10/ruff-0.4.10-aarch64-apple-darwin.tar.gz",
  "0.4.10|linux_x86_64|332ba368c6e08afc3c5d1c7f6e4fb7bf238b7cbf007b400e6bdf01a0a36ae656|10130989|https://github.com/astral-sh/ruff/releases/download/v0.4.10/ruff-0.4.10-x86_64-unknown-linux-musl.tar.gz",
  "0.4.10|linux_arm64|75332c97520233b5f95cb3d40bdef13b40e1aa5e6c82a078623993545771f55f|9851689|https://github.com/astral-sh/ruff/releases/download/v0.4.10/ruff-0.4.10-aarch64-unknown-linux-musl.tar.gz",
  "0.4.9|macos_x86_64|e4d745adb0f5a0b08f2c9ca71e57f451a9b8485ae35b5555d9f5d20fc93a6cb6|8510706|https://github.com/astral-sh/ruff/releases/download/v0.4.9/ruff-0.4.9-x86_64-apple-darwin.tar.gz",
  "0.4.9|macos_arm64|5f4506d7ec2ae6ac5a48ba309218a4b825a00d4cad9967b7bbcec1724ef04930|8148128|https://github.com/astral-sh/ruff/releases/download/v0.4.9/ruff-0.4.9-aarch64-apple-darwin.tar.gz",
  "0.4.9|linux_x86_64|5ceba21dad91e3fa05056ca62f278b0178516cfad8dbf08cf2433c6f1eeb92d3|8863118|https://github.com/astral-sh/ruff/releases/download/v0.4.9/ruff-0.4.9-x86_64-unknown-linux-musl.tar.gz",
  "0.4.9|linux_arm64|00c50563f9921a141ddd4ec0371149f3bbfa0369d9d238a143bcc3a932363785|8106747|https://github.com/astral-sh/ruff/releases/download/v0.4.9/ruff-0.4.9-aarch64-unknown-linux-musl.tar.gz",
  "0.3.7|macos_x86_64|b1c961c1bed427e74ab72950c6debcb078c82aba0ee347183cc27a9fc8aaa43b|8615221|https://github.com/astral-sh/ruff/releases/download/v0.3.7/ruff-0.3.7-x86_64-apple-darwin.tar.gz",
  "0.3.7|linux_x86_64|3f8348096f7d9c0a9266c4a821dbc7599ef299983e456b61eb0d5290d8615df8|8905370|https://github.com/astral-sh/ruff/releases/download/v0.3.7/ruff-0.3.7-x86_64-unknown-linux-musl.tar.gz",
  "0.3.7|linux_arm64|0e79fbefcd813a10fa60250441bbe36978c95d010b64646848fada64b9af61f0|8180808|https://github.com/astral-sh/ruff/releases/download/v0.3.7/ruff-0.3.7-aarch64-unknown-linux-musl.tar.gz",
  "0.2.2|macos_x86_64|798a2028a783f10f21f11eb59763eabcff9961d4302cdcc37d186ab9f864ca82|7611899|https://github.com/astral-sh/ruff/releases/download/v0.2.2/ruff-0.2.2-x86_64-apple-darwin.tar.gz",
  "0.2.2|macos_arm64|21454a77f0a5ff8ed23a43327f6de9c2f9f6bab1352ebe87fc03866889fa7fae|7262889|https://github.com/astral-sh/ruff/releases/download/v0.2.2/ruff-0.2.2-aarch64-apple-darwin.tar.gz",
  "0.2.2|linux_x86_64|044e4dbd46acc12de78a144c24fd9af86003eaba28e83244546d85076a9c7b04|7881552|https://github.com/astral-sh/ruff/releases/download/v0.2.2/ruff-0.2.2-x86_64-unknown-linux-musl.tar.gz",
  "0.2.2|linux_arm64|e73a37f41acf4a4f44cdb9b587316f0f9eb83b51c3c134d1401501e3f8d65dee|7247275|https://github.com/astral-sh/ruff/releases/download/v0.2.2/ruff-0.2.2-aarch64-unknown-linux-musl.tar.gz",
  "0.1.15|macos_x86_64|6d006dc427a74cba930717297b0c472856a2be4cfc37cd04309895c11329dc68|7308240|https://github.com/astral-sh/ruff/releases/download/v0.1.15/ruff-0.1.15-x86_64-apple-darwin.tar.gz",
  "0.1.15|macos_arm64|373c648d693ddaf4f1936a05d3093aabd08553f585c3c3afbbdba41d16b70032|7025376|https://github.com/astral-sh/ruff/releases/download/v0.1.15/ruff-0.1.15-aarch64-apple-darwin.tar.gz",
  "0.1.15|linux_x86_64|d7389b9743b0b909c364d11bba94d13302171d751430b58c13dcdf248e924276|7605249|https://github.com/astral-sh/ruff/releases/download/v0.1.15/ruff-0.1.15-x86_64-unknown-linux-musl.tar.gz",
  "0.1.15|linux_arm64|e9ed3c353c4f2b801ed4d21fee2b6159883ad777e959fbbad0b2d2b22e1974c7|7049764|https://github.com/astral-sh/ruff/releases/download/v0.1.15/ruff-0.1.15-aarch64-unknown-linux-musl.tar.gz"
]
skip boolean

If true, don't use Ruff when running pants fmt and pants fix and pants lint https://www.pantsbuild.org/v2.31/docs/reference-ruff#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-ruff#url_platform_mapping

Default:
{
  "linux_arm64": "aarch64-unknown-linux-musl",
  "linux_x86_64": "x86_64-unknown-linux-musl",
  "macos_arm64": "aarch64-apple-darwin",
  "macos_x86_64": "x86_64-apple-darwin"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-ruff#url_template

Default: "https://github.com/astral-sh/ruff/releases/download/{version}/ruff-{platform}.tar.gz"
use_unsupported_version enum

What action to take in case the requested version of Ruff is not supported https://www.pantsbuild.org/v2.31/docs/reference-ruff#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "0.13.0"
run object

Runs a binary target.

This goal propagates the return code of the underlying executable.

If your application can safely be restarted while it is running, you can pass restartable=True on your binary target (for supported types), and the run goal will automatically restart them as all relevant files change. This can be particularly useful for server applications.

2 nested properties
args array

Arguments to pass directly to the executed target, e.g. --run-args='val1 val2 --debug' https://www.pantsbuild.org/v2.31/docs/reference-run#args

Default:
[]
debug_adapter boolean

Run the interactive process using a Debug Adapter (https://microsoft.github.io/debug-adapter-protocol/) for the language if supported https://www.pantsbuild.org/v2.31/docs/reference-run#debug_adapter

Default: false
scala object

Scala programming language

2 nested properties
tailor_source_targets boolean

If true, add scala_sources, scala_junit_tests, and scalatest_tests targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-scala#tailor_source_targets

Default: true
version_for_resolve object

A dictionary mapping the name of a resolve to the Scala version to use for all Scala targets consuming that resolve https://www.pantsbuild.org/v2.31/docs/reference-scala#version_for_resolve

Default:
{}
scala-dump-source-analysis object

Dump source analysis for scala_source targets.

scala-infer object

Options controlling which dependencies will be inferred for Scala targets.

4 nested properties
consumed_types boolean

Infer a target's dependencies by parsing consumed types from sources https://www.pantsbuild.org/v2.31/docs/reference-scala-infer#consumed_types

Default: true
force_add_siblings_as_dependencies boolean

If true, add a dependency on all scala_source targets generated by the same scala_sources target generator https://www.pantsbuild.org/v2.31/docs/reference-scala-infer#force_add_siblings_as_dependencies

Default: false
imports boolean

Infer a target's dependencies by parsing import statements from sources https://www.pantsbuild.org/v2.31/docs/reference-scala-infer#imports

Default: true
package_objects boolean

Add dependency on the package object to every target https://www.pantsbuild.org/v2.31/docs/reference-scala-infer#package_objects

Default: true
scala-parser object

Internal tool for parsing Scala sources to identify dependencies

4 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-scala-parser#artifacts

Default:
[
  "org.scalameta:scalameta_2.13:4.8.7",
  "io.circe:circe-generic_2.13:0.14.1",
  "org.scala-lang:scala-library:2.13.8"
]
jvm_options array

List of JVM options to pass to scala-parser JVM processes https://www.pantsbuild.org/v2.31/docs/reference-scala-parser#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-scala-parser#lockfile

Default: "<default>"
version string
Default: null
scalac object

The Scala compiler.

3 nested properties
args array

Arguments to pass directly to scalac, e.g. --scalac-args='-encoding UTF-8' https://www.pantsbuild.org/v2.31/docs/reference-scalac#args

Default:
[]
args_for_resolve object

A dictionary mapping JVM resolve names to additional arguments to pass to scalac for that resolve https://www.pantsbuild.org/v2.31/docs/reference-scalac#args_for_resolve

Default:
{}
plugins_for_resolve object

A dictionary, whose keys are the names of each JVM resolve that requires default scalac plugins, and the value is a comma-separated string consisting of scalac plugin names https://www.pantsbuild.org/v2.31/docs/reference-scalac#plugins_for_resolve

Default:
{}
scalafix object

scalafix (https://scalacenter.github.io/scalafix/)

9 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-scalafix#artifacts

Default:
[
  "ch.epfl.scala:scalafix-cli_2.13.12:{version}"
]
config_file_name string

Name of a config file understood by scalafix (https://scalacenter.github.io/scalafix/docs/users/configuration.html) https://www.pantsbuild.org/v2.31/docs/reference-scalafix#config_file_name

Default: ".scalafix.conf"
jvm_options array

List of JVM options to pass to scalafix JVM processes https://www.pantsbuild.org/v2.31/docs/reference-scalafix#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-scalafix#lockfile

Default: "<default>"
orphan_files_behavior enum

Whether to ignore, error or show a warning when files are found that are not covered by the config file provided in [scalafix].config_file_name setting https://www.pantsbuild.org/v2.31/docs/reference-scalafix#orphan_files_behavior

Default: "error"
Values: "ignore" "error" "warn"
rule_targets array

List of targets providing additional Scalafix rules https://www.pantsbuild.org/v2.31/docs/reference-scalafix#rule_targets

Default:
[]
semantic_rules boolean
Default: true
skip boolean

If true, don't use scalafix when running pants fix and pants lint https://www.pantsbuild.org/v2.31/docs/reference-scalafix#skip

Default: false
version string
Default: "0.11.1"
scalafmt object

scalafmt (https://scalameta.org/scalafmt/)

7 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#artifacts

Default:
[
  "org.scalameta:scalafmt-cli_2.13:{version}"
]
config_file_name string

Name of a config file understood by scalafmt (https://scalameta.org/scalafmt/docs/configuration.html) https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#config_file_name

Default: ".scalafmt.conf"
jvm_options array

List of JVM options to pass to scalafmt JVM processes https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#lockfile

Default: "<default>"
orphan_files_behavior enum

Whether to ignore, error or show a warning when files are found that are not covered by the config file provided in [scalafmt].config_file_name setting https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#orphan_files_behavior

Default: "error"
Values: "ignore" "error" "warn"
skip boolean

If true, don't use scalafmt when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-scalafmt#skip

Default: false
version string
Default: "3.2.1"
scalatest object

The Scalatest test framework (https://www.scalatest.org/)

6 nested properties
args array

Arguments to pass directly to Scalatest, e.g. --scalatest-args='-t $testname' https://www.pantsbuild.org/v2.31/docs/reference-scalatest#args

Default:
[]
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-scalatest#artifacts

Default:
[
  "org.scalatest:scalatest_2.13:{version}"
]
jvm_options array

List of JVM options to pass to scalatest JVM processes https://www.pantsbuild.org/v2.31/docs/reference-scalatest#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-scalatest#lockfile

Default: "<default>"
skip boolean

If true, don't use Scalatest when running pants test https://www.pantsbuild.org/v2.31/docs/reference-scalatest#skip

Default: false
version string
Default: "3.2.10"
scc object

The Succinct Code Counter, aka scc (https://github.com/boyter/scc).

6 nested properties
args array

Arguments to pass directly to SCC, e.g. --scc-args='--no-cocomo' https://www.pantsbuild.org/v2.31/docs/reference-scc#args

Default:
[]
known_versions array

Known versions to verify downloads against https://www.pantsbuild.org/v2.31/docs/reference-scc#known_versions

Default:
[
  "3.0.0|macos_arm64 |846cb1b25025a0794d455719bc17cfb3f588576a58af1d95036f6c654e294f98|2006145",
  "3.0.0|macos_x86_64|9c3064e477ab36e16204ad34f649372034bca4df669615eff5de4aa05b2ddf1a|2048134",
  "3.0.0|linux_arm64 |04f9e797b70a678833e49df5e744f95080dfb7f963c0cd34f5b5d4712d290f33|1768037",
  "3.0.0|linux_x86_64|13ca47ce00b5bd032f97f3af7aa8eb3c717b8972b404b155a378b09110e4aa0c|1948341"
]
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-scc#url_platform_mapping

Default:
{
  "linux_arm64": "arm64-unknown-linux",
  "linux_x86_64": "x86_64-unknown-linux",
  "macos_arm64": "arm64-apple-darwin",
  "macos_x86_64": "x86_64-apple-darwin"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-scc#url_template

Default: "https://github.com/boyter/scc/releases/download/v{version}/scc-{version}-{platform}.zip"
use_unsupported_version enum

What action to take in case the requested version of SCC is not supported https://www.pantsbuild.org/v2.31/docs/reference-scc#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "3.0.0"
setup-py-generation object

Options to control how setup.py is generated from a python_distribution target.

2 nested properties
first_party_dependency_version_scheme enum

What version to set in install_requires when a python_distribution depends on other python_distributions https://www.pantsbuild.org/v2.31/docs/reference-setup-py-generation#first_party_dependency_version_scheme

Default: "exact"
Values: "exact" "compatible" "any"
generate_setup_default boolean

The default value for the generate_setup field on python_distribution targets https://www.pantsbuild.org/v2.31/docs/reference-setup-py-generation#generate_setup_default

Default: true
setuptools object

Python setuptools, used to package python_distribution targets.

This version of Pants uses setuptools version 80.9.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

2 nested properties
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-setuptools#install_from_resolve

Default: null
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-setuptools#requirements

Default:
[]
setuptools-scm object

A tool for generating versions from VCS metadata (https://github.com/pypa/setuptools_scm).

This version of Pants uses setuptools-scm version 7.1.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

5 nested properties
console_script string
Default: null
entry_point string
Default: "setuptools_scm"
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-setuptools-scm#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-setuptools-scm#requirements

Default:
[]
shell-setup object

Options for Pants's Shell support.

4 nested properties
dependency_inference boolean

Infer Shell dependencies on other Shell files by analyzing source statements https://www.pantsbuild.org/v2.31/docs/reference-shell-setup#dependency_inference

Default: true
executable_search_paths array

The PATH value that will be used to find shells and to run certain processes like the shunit2 test runner https://www.pantsbuild.org/v2.31/docs/reference-shell-setup#executable_search_paths

Default:
[
  "<PATH>"
]
tailor_shunit2_tests boolean

If true, add shunit2_tests targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-shell-setup#tailor_shunit2_tests

Default: true
tailor_sources boolean

If true, add shell_sources targets with the tailor goal https://www.pantsbuild.org/v2.31/docs/reference-shell-setup#tailor_sources

Default: true
shell-test object

Options for Pants' Shell test support.

1 nested properties
skip boolean

If true, don't use Test with shell scripts when running pants test https://www.pantsbuild.org/v2.31/docs/reference-shell-test#skip

Default: false
shellcheck object

A linter for shell scripts.

8 nested properties
args array

Arguments to pass directly to Shellcheck, e.g. --shellcheck-args='-e SC20529' https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#args

Default:
[]
config_discovery boolean

If true, Pants will include all relevant .shellcheckrc and shellcheckrc files during runs https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#config_discovery

Default: true
known_versions array
Default:
[
  "v0.10.0|macos_arm64 |bbd2f14826328eee7679da7221f2bc3afb011f6a928b848c80c321f6046ddf81|7205756",
  "v0.10.0|macos_x86_64|ef27684f23279d112d8ad84e0823642e43f838993bbb8c0963db9b58a90464c2|4371632",
  "v0.10.0|linux_arm64 |324a7e89de8fa2aed0d0c28f3dab59cf84c6d74264022c00c22af665ed1a09bb|4291764",
  "v0.10.0|linux_x86_64|6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87|2404716"
]
skip boolean

If true, don't use Shellcheck when running pants lint https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#url_platform_mapping

Default:
{
  "linux_arm64": "linux.aarch64",
  "linux_x86_64": "linux.x86_64",
  "macos_arm64": "darwin.aarch64",
  "macos_x86_64": "darwin.x86_64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#url_template

Default: "https://github.com/koalaman/shellcheck/releases/download/{version}/shellcheck-{version}.{platform}.tar.xz"
use_unsupported_version enum

What action to take in case the requested version of Shellcheck is not supported https://www.pantsbuild.org/v2.31/docs/reference-shellcheck#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "v0.10.0"
shfmt object

An autoformatter for shell scripts (https://github.com/mvdan/sh).

8 nested properties
args array

Arguments to pass directly to shfmt, e.g. --shfmt-args='-i 2' https://www.pantsbuild.org/v2.31/docs/reference-shfmt#args

Default:
[]
config_discovery boolean

If true, Pants will include all relevant .editorconfig files during runs https://www.pantsbuild.org/v2.31/docs/reference-shfmt#config_discovery

Default: true
known_versions array
Default:
[
  "v3.2.4|macos_arm64 |e70fc42e69debe3e400347d4f918630cdf4bf2537277d672bbc43490387508ec|2998546",
  "v3.2.4|macos_x86_64|43a0461a1b54070ddc04fbbf1b78f7861ee39a65a61f5466d15a39c4aba4f917|2980208",
  "v3.2.4|linux_arm64 |6474d9cc08a1c9fe2ef4be7a004951998e3067d46cf55a011ddd5ff7bfab3de6|2752512",
  "v3.2.4|linux_x86_64|3f5a47f8fec27fae3e06d611559a2063f5d27e4b9501171dde9959b8c60a3538|2797568",
  "v3.6.0|macos_arm64 |633f242246ee0a866c5f5df25cbf61b6af0d5e143555aca32950059cf13d91e0|3065202",
  "v3.6.0|macos_x86_64|b8c9c025b498e2816b62f0b717f6032e9ab49e725a45b8205f52f66318f17185|3047552",
  "v3.6.0|linux_arm64 |fb1cf0af3dbe9aac7d98e38e3c7426765208ecfe23cb2da51037bb234776fd70|2818048",
  "v3.6.0|linux_x86_64|5741a02a641de7e56b8da170e71a97e58050d66a3cf485fb268d6a5a8bb74afb|2850816",
  "v3.8.0|macos_arm64 |1481240d2a90d4f0b530688d76d4f9117d17a756b6027cfa42b96f0707317f83|2736466",
  "v3.8.0|macos_x86_64|c0218b47a0301bb006f49fad85d2c08de23df303472834faf5639d04121320f8|2747696",
  "v3.8.0|linux_arm64 |27e1f69b0d57c584bcbf5c882b4c4f78ffcf945d0efef45c1fbfc6692213c7c3|2687128",
  "v3.8.0|linux_x86_64|27b3c6f9d9592fc5b4856c341d1ff2c88856709b9e76469313642a1d7b558fe0|2703512"
]
skip boolean

If true, don't use shfmt when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-shfmt#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-shfmt#url_platform_mapping

Default:
{
  "linux_arm64": "linux_arm64",
  "linux_x86_64": "linux_amd64",
  "macos_arm64": "darwin_arm64",
  "macos_x86_64": "darwin_amd64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-shfmt#url_template

Default: "https://github.com/mvdan/sh/releases/download/{version}/shfmt_{version}_{platform}"
use_unsupported_version enum

What action to take in case the requested version of shfmt is not supported https://www.pantsbuild.org/v2.31/docs/reference-shfmt#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "v3.8.0"
shunit2 object

shUnit2 is a xUnit framework for Bourne based shell scripts (https://github.com/kward/shunit2)

6 nested properties
known_versions array
Default:
[
  "b9102bb763cc603b3115ed30a5648bf950548097|macos_arm64|1f11477b7948150d1ca50cdd41d89be4ed2acd137e26d2e0fe23966d0e272cc5|40987",
  "b9102bb763cc603b3115ed30a5648bf950548097|macos_x86_64|1f11477b7948150d1ca50cdd41d89be4ed2acd137e26d2e0fe23966d0e272cc5|40987",
  "b9102bb763cc603b3115ed30a5648bf950548097|linux_x86_64|1f11477b7948150d1ca50cdd41d89be4ed2acd137e26d2e0fe23966d0e272cc5|40987",
  "b9102bb763cc603b3115ed30a5648bf950548097|linux_arm64|1f11477b7948150d1ca50cdd41d89be4ed2acd137e26d2e0fe23966d0e272cc5|40987"
]
skip boolean

If true, don't use shunit2 when running pants test https://www.pantsbuild.org/v2.31/docs/reference-shunit2#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-shunit2#url_platform_mapping

Default:
{}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-shunit2#url_template

Default: "https://raw.githubusercontent.com/kward/shunit2/{version}/shunit2"
use_unsupported_version enum

What action to take in case the requested version of shunit2 is not supported https://www.pantsbuild.org/v2.31/docs/reference-shunit2#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "b9102bb763cc603b3115ed30a5648bf950548097"
source object

Configuration for roots of source trees.

2 nested properties
marker_filenames array

The presence of a file of this name in a directory indicates that the directory is a source root https://www.pantsbuild.org/v2.31/docs/reference-source#marker_filenames

Default:
[]
root_patterns array
Default:
[
  "/",
  "src",
  "src/python",
  "src/py",
  "src/thrift",
  "src/protobuf",
  "src/protos",
  "src/scala",
  "src/java"
]
stats object

An aggregator for Pants stats, such as cache metrics.

4 nested properties
format enum
Default: "text"
Values: "text" "jsonlines"
log boolean

At the end of the Pants run, log all counter metrics and summaries of observation histograms, e.g. the number of cache hits and the time saved by caching https://www.pantsbuild.org/v2.31/docs/reference-stats#log

Default: false
memory_summary boolean

At the end of the Pants run, report a summary of memory usage https://www.pantsbuild.org/v2.31/docs/reference-stats#memory_summary

Default: false
output_file string
Default: null
strip-jar object

Reproducible Build Maven Plugin

4 nested properties
artifacts array

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version) https://www.pantsbuild.org/v2.31/docs/reference-strip-jar#artifacts

Default:
[
  "io.github.zlika:reproducible-build-maven-plugin:{version}"
]
jvm_options array

List of JVM options to pass to strip-jar JVM processes https://www.pantsbuild.org/v2.31/docs/reference-strip-jar#jvm_options

Default:
[]
lockfile string

Path to a lockfile used for installing the tool https://www.pantsbuild.org/v2.31/docs/reference-strip-jar#lockfile

Default: "<default>"
version string
Default: "0.16"
subprocess-environment object

Environment settings for forked subprocesses.

1 nested properties
env_vars array

Environment variables to set for process invocations https://www.pantsbuild.org/v2.31/docs/reference-subprocess-environment#env_vars

Default:
[
  "LANG",
  "LC_CTYPE",
  "LC_ALL",
  "SSL_CERT_FILE",
  "SSL_CERT_DIR"
]
system-binaries object

System binaries related settings.

1 nested properties
system_binary_paths array
Default:
[
  "/usr/bin",
  "/bin",
  "/usr/local/bin",
  "/opt/homebrew/bin"
]
tailor object

Auto-generate BUILD file targets for new source files.

Each specific tailor implementation may be disabled through language-specific options, e.g. [python].tailor_pex_binary_targets and [shell-setup].tailor.

7 nested properties
alias_mapping object

A mapping from standard target type to custom type to use instead https://www.pantsbuild.org/v2.31/docs/reference-tailor#alias_mapping

Default:
{}
build_file_header string

A header, e.g., a copyright notice, to add to the content of created BUILD files https://www.pantsbuild.org/v2.31/docs/reference-tailor#build_file_header

Default: null
build_file_indent string

The indent to use when auto-editing BUILD files https://www.pantsbuild.org/v2.31/docs/reference-tailor#build_file_indent

Default: " "
build_file_name string
Default: "BUILD"
check boolean

Do not write changes to disk, only write back what would change https://www.pantsbuild.org/v2.31/docs/reference-tailor#check

Default: false
ignore_adding_targets array
Default:
[]
ignore_paths array

Do not edit or create BUILD files at these paths https://www.pantsbuild.org/v2.31/docs/reference-tailor#ignore_paths

Default:
[]
taplo object

An autoformatter for TOML files (https://taplo.tamasfe.dev/)

9 nested properties
args array

Arguments to pass directly to Taplo, e.g. --taplo-args='--option=align_entries=false' https://www.pantsbuild.org/v2.31/docs/reference-taplo#args

Default:
[]
config_discovery boolean

If true, Pants will include a taplo.toml or .taplo.toml file found in the build root during a run https://www.pantsbuild.org/v2.31/docs/reference-taplo#config_discovery

Default: true
glob_pattern array

A list of glob patterns of files to include/exclude in formatting relative to the build root https://www.pantsbuild.org/v2.31/docs/reference-taplo#glob_pattern

Default:
[
  "**/*.toml",
  "!.taplo.toml",
  "!taplo.toml"
]
known_versions array
Default:
[
  "0.9.3|macos_x86_64|6b4180fe0518e3e68b9a421dbe50f62ede308767972c4c70c6bbe6651ea98641|4243525",
  "0.9.3|macos_arm64|39b84d62d6a47855b2c64148cde9c9ca5721bf422b8c9fe9c92776860badde5f|4039644",
  "0.9.3|linux_x86_64|889efcfa067b179fda488427d3b13ce2d679537da8b9ed8138ba415db7da2a5e|4477376",
  "0.9.3|linux_arm64|7c07379d3288fb5c26b1c29bbedec4f8d8f602d776bcc3a1578176733b6a857c|4393144",
  "0.8.0|macos_x86_64|a1917f1b9168cb4f7d579422dcdf9c733028d873963d8fa3a6f499e41719c502|3926263",
  "0.8.0|macos_arm64|79c1691c3c46be981fa0cec930ec9a6d6c4ffd27272d37d1885514ce59bd8ccf|3661689",
  "0.8.0|linux_x86_64|3703294fac37ca9a9f76308f9f98c3939ccb7588f8972acec68a48d7a10d8ee5|4123593",
  "0.8.0|linux_arm64|a6a94482f125c21090593f94cad23df099c4924f5b9620cda4a8653527c097a1|3995383"
]
skip boolean

If true, don't use Taplo when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-taplo#skip

Default: false
url_platform_mapping object

A dictionary mapping platforms to strings to be used when generating the URL to download the tool https://www.pantsbuild.org/v2.31/docs/reference-taplo#url_platform_mapping

Default:
{
  "linux_arm64": "linux-aarch64",
  "linux_x86_64": "linux-x86_64",
  "macos_arm64": "darwin-aarch64",
  "macos_x86_64": "darwin-x86_64"
}
url_template string

URL to download the tool, either as a single binary file or a compressed file (e.g. zip file) https://www.pantsbuild.org/v2.31/docs/reference-taplo#url_template

Default: "https://github.com/tamasfe/taplo/releases/download/{version}/taplo-{platform}.gz"
use_unsupported_version enum

What action to take in case the requested version of Taplo is not supported https://www.pantsbuild.org/v2.31/docs/reference-taplo#use_unsupported_version

Default: "error"
Values: "error" "warning"
version string
Default: "0.9.3"
test object

Run tests.

17 nested properties
attempts_default number

The number of attempts to run tests, in case of a test failure https://www.pantsbuild.org/v2.31/docs/reference-test#attempts_default

Default: 1
batch_size number

The target maximum number of files to be included in each run of batch-enabled test runners https://www.pantsbuild.org/v2.31/docs/reference-test#batch_size

Default: 128
debug boolean

Run tests sequentially in an interactive process https://www.pantsbuild.org/v2.31/docs/reference-test#debug

Default: false
debug_adapter boolean

Run tests sequentially in an interactive process, using a Debug Adapter (https://microsoft.github.io/debug-adapter-protocol/) for the language if supported https://www.pantsbuild.org/v2.31/docs/reference-test#debug_adapter

Default: false
experimental_report_test_result_info boolean
Default: false
extra_env_vars array

Additional environment variables to include in test processes https://www.pantsbuild.org/v2.31/docs/reference-test#extra_env_vars

Default:
[]
force boolean

Force the tests to run, even if they could be satisfied from cache https://www.pantsbuild.org/v2.31/docs/reference-test#force

Default: false
open_coverage boolean

If a coverage report file is generated, open it on the local system if the system supports this https://www.pantsbuild.org/v2.31/docs/reference-test#open_coverage

Default: false
output enum
Default: "failed"
Values: "all" "failed" "none"
report boolean
Default: false
report_dir string
Default: "{distdir}/test/reports"
shard string

A shard specification of the form "k/N", where N is a positive integer and k is a non-negative integer less than N https://www.pantsbuild.org/v2.31/docs/reference-test#shard

Default: ""
show_rerun_command boolean

If tests fail, show an appropriate pants test ... invocation to rerun just those tests https://www.pantsbuild.org/v2.31/docs/reference-test#show_rerun_command

Default: false
timeout_default number

The default timeout (in seconds) for a test target if the timeout field is not set on the target https://www.pantsbuild.org/v2.31/docs/reference-test#timeout_default

Default: null
timeout_maximum number

The maximum timeout (in seconds) that may be used on a test target https://www.pantsbuild.org/v2.31/docs/reference-test#timeout_maximum

Default: null
timeouts boolean
Default: true
use_coverage boolean

Generate a coverage report if the test runner supports it https://www.pantsbuild.org/v2.31/docs/reference-test#use_coverage

Default: false
twine object

The utility for publishing Python distributions to PyPI and other Python repositories.

This version of Pants uses twine version 4.0.2 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

10 nested properties
args array

Arguments to pass directly to Twine, e.g. --twine-args='--skip-existing' https://www.pantsbuild.org/v2.31/docs/reference-twine#args

Default:
[]
ca_certs_path string

Path to a file containing PEM-format CA certificates used for verifying secure connections when publishing python distributions https://www.pantsbuild.org/v2.31/docs/reference-twine#ca_certs_path

Default: "<inherit>"
config

Path to a .pypirc config file to use. (https://packaging.python.org/specifications/pypirc/) https://www.pantsbuild.org/v2.31/docs/reference-twine#config

Default: null
config_discovery boolean

If true, Pants will include all relevant config files during runs (.pypirc) https://www.pantsbuild.org/v2.31/docs/reference-twine#config_discovery

Default: true
console_script string
Default: "twine"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-twine#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-twine#requirements

Default:
[]
skip boolean

If true, don't use Twine when running pants publish https://www.pantsbuild.org/v2.31/docs/reference-twine#skip

Default: false
typescript object

TypeScript type checker (tsc).

5 nested properties
binary_name string
Default: null
extra_build_args array

Extra arguments to pass to tsc when running in --build mode https://www.pantsbuild.org/v2.31/docs/reference-typescript#extra_build_args

Default:
[]
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve, instead of the version configured in this subsystem https://www.pantsbuild.org/v2.31/docs/reference-typescript#install_from_resolve

Default: null
skip boolean

If true, don't use TypeScript when running pants check https://www.pantsbuild.org/v2.31/docs/reference-typescript#skip

Default: false
version string

Version string for the tool in the form package@version (e.g. [email protected]) https://www.pantsbuild.org/v2.31/docs/reference-typescript#version

Default: "typescript@FROM_PACKAGE_JSON"
update-build-files object

Format and fix safe deprecations in BUILD files.

This does not handle the full Pants upgrade. You must still manually change pants_version in pants.toml and you may need to manually address some deprecations. See https://www.pantsbuild.org/2.31/docs/releases/upgrade-tips for upgrade tips.

4 nested properties
check boolean

Do not write changes to disk, only write back what would change https://www.pantsbuild.org/v2.31/docs/reference-update-build-files#check

Default: false
fix_safe_deprecations boolean

Automatically fix deprecations, such as target type renames, that are safe because they do not change semantics https://www.pantsbuild.org/v2.31/docs/reference-update-build-files#fix_safe_deprecations

Default: true
fmt boolean
Default: true
formatter enum

Which formatter Pants should use to format BUILD files https://www.pantsbuild.org/v2.31/docs/reference-update-build-files#formatter

Default: "black"
Values: "yapf" "black" "ruff" "buildifier"
version object

Display Pants version.

visibility object

Options for the visibility rules implementation of the dependency rules API.

2 nested properties
enforce boolean

Visibility rules are enforced whenever dependencies are calculated unless enforce is set to false https://www.pantsbuild.org/v2.31/docs/reference-visibility#enforce

Default: true
skip boolean

If true, don't use Visibility Rules when running pants lint https://www.pantsbuild.org/v2.31/docs/reference-visibility#skip

Default: false
workunit-logger object

Workunit Logger subsystem. Useful for debugging pants itself.

2 nested properties
enabled boolean
Default: false
logdir string
Default: ".pants.d"
yapf object

A formatter for Python files (https://github.com/google/yapf).

This version of Pants uses yapf version 0.43.0 by default. Use a dedicated lockfile and the install_from_resolve option to control this.

9 nested properties
args array

Arguments to pass directly to yapf, e.g. --yapf-args='--no-local-style' https://www.pantsbuild.org/v2.31/docs/reference-yapf#args

Default:
[]
config

Path to style file understood by yapf (https://github.com/google/yapf#formatting-style/) https://www.pantsbuild.org/v2.31/docs/reference-yapf#config

Default: null
config_discovery boolean

If true, Pants will include any relevant config files during runs (.style.yapf, pyproject.toml, and setup.cfg) https://www.pantsbuild.org/v2.31/docs/reference-yapf#config_discovery

Default: true
console_script string
Default: "yapf"
entry_point string
Default: null
install_from_resolve string

If specified, install the tool using the lockfile for this named resolve https://www.pantsbuild.org/v2.31/docs/reference-yapf#install_from_resolve

Default: null
interpreter_constraints array
Default:
[
  "CPython>=3.9,<3.15"
]
requirements array

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile https://www.pantsbuild.org/v2.31/docs/reference-yapf#requirements

Default:
[]
skip boolean

If true, don't use yapf when running pants fmt and pants lint https://www.pantsbuild.org/v2.31/docs/reference-yapf#skip

Default: false