pants

The Pants Build System

APACHE-2.0 License

Downloads
117.9K
Stars
3.1K
Committers
342

Bot releases are visible (Hide)

pants - release_2.19.0rc3

Published by github-actions[bot] 10 months ago

Bug Fixes

  • Make docker_environment's Pants-provided-PBS an absolute path (Cherry-pick of #20314) (#20339)

  • Allow docker image pulling without creds (Cherry-pick of #20307) (#20325)

  • Ensure experimental_test_shell_command runs in relevant environment (Cherry-pick of #20319) (#20321)

pants - release_2.20.0.dev4

Published by github-actions[bot] 10 months ago

New Features

  • Support dependency inference with JVM codegen backends (#20285)

  • Support coursier --force-version argument (#20238)

Bug Fixes

  • Make docker_environment's Pants-provided-PBS an absolute path (#20314)

  • Fix algorithm for gathering prebuilt Go object files (#20332)

  • Allow docker image pulling without creds (#20307)

  • Ensure experimental_test_shell_command runs in relevant environment (#20319)

Documentation

  • Update team.md (#20329)

  • Change the slug of the Shell backend doc. (#20326)

pants - release_2.18.2rc0

Published by github-actions[bot] 10 months ago

New Features

  • Allow passing arbitrary args to PEX invocation when building FaaS artifacts (Cherry-pick of #20237) (#20281)

Bug Fixes

  • Fix: run terraform validate on modules again (Cherry-pick of #20230) (#20299)

  • fix: terraform_relpath works on files not in direct subpath (Cherry-pick of #20276) (#20301)

  • Fix wrong jar path given to shade jar process (Cherry-pick of #20239) (#20254)

pants - release_2.19.0rc2

Published by github-actions[bot] 10 months ago

New Features

  • Allow passing arbitrary args to PEX invocation when building FaaS artifacts (Cherry-pick of #20237) (#20280)

Bug Fixes

  • fix: terraform_relpath works on files not in direct subpath (Cherry-pick of #20276) (#20300)

  • Fix: run terraform validate on modules again (Cherry-pick of #20230) (#20298)

pants - release_2.20.0.dev3

Published by github-actions[bot] 10 months ago

New Features

  • helm: add option to pass --quiet when linting charts (#20204)

  • Allow passing arbitrary args to PEX invocation when building FaaS artifacts (#20237)

Bug Fixes

  • fix: terraform_relpath works on files not in direct subpath (#20276)

  • Fix: run terraform validate on modules again (#20230)

Documentation

  • Don't use tabbed-codeblock in Markdown (#20290)
pants - release_2.20.0.dev2

Published by github-actions[bot] 11 months ago

New Features

  • allow passing --timeout along to helm commands (#20273)

  • Add support for Scalac plugins in BSP (#20267)

  • typescript: add tailor goal (#20252)

Bug Fixes

  • Use fork of indicatif to work around output truncation (#20269)

  • Validate that the file content has type bytes (#20261)

Documentation

  • add always mode for RemoteCacheWarningsBehavior (#20268)

  • Include guidance on skipping files under Black & isort (#20262)

pants - release_2.19.0rc1

Published by github-actions[bot] 11 months ago

Bug Fixes

  • Use fork of indicatif to work around output truncation (Cherry-pick of #20269) (#20277)

  • Fix wrong jar path given to shade jar process (Cherry-pick of #20239) (#20253)

pants - release_2.18.1

Published by github-actions[bot] 11 months ago

Bug Fixes

  • Fix spurious warnings about Helm interpolations due to incorrect comparison (#20220)

  • Silence warnings about internal call of deprecated Helm function on 2.18 (#20217)

  • Skip jvm dependencies without entries (Cherry-pick of #20192) (#20212)

  • Resolve appropriate Scala artifacts for BSP (Cherry-pick of #20157) (#20163)

  • Do not choke on values from macros on environment targets during bootstrap. (Cherry-pick of #20191) (#20199)

  • Use a Zulu JDK 8 to run the Kotlin analyzer. (Cherry-pick of #20184) (#20194)

Documentation

  • Add note in docker_environment image field help on tool requirements (Cherry-pick of #20231) (#20234)
pants - release_2.20.0.dev1

Published by github-actions[bot] 11 months ago

New Features

  • typescript: add TypeScript source and test targets (#20226)

  • Infers Django migrations and management commands as dependencies of apps.py (#20250)

  • Discover Ruff config in pyproject.toml in subdirectories (#20248)

User API Changes

  • Update to Ruff 0.1.6 (#20249)

  • Add remote_oauth_bearer_token option, deprecating remote_oauth_bearer_token_path (#20116)

Bug Fixes

  • Fix wrong jar path given to shade jar process (#20239)

  • Make FrozenDict comparisons & hash order-insensitive, compare to dict (#20221)

Documentation

  • Add note in docker_environment image field help on tool requirements (#20231)

  • Add link to talk at Hamburg Python Pizza (#20223)

pants - release_2.19.0rc0

Published by github-actions[bot] 11 months ago

New Features

  • Add docker image output field to support publish to repository when using BuildKit (Cherry-pick of #20154) (#20185)

Bug Fixes

  • Skip jvm dependencies without entries (Cherry-pick of #20192) (#20211)

  • Remove print() statement (Cherry-pick of #20196) (#20203)

  • Do not choke on values from macros on environment targets during bootstrap. (Cherry-pick of #20191) (#20198)

  • Use a Zulu JDK 8 to run the Kotlin analyzer. (Cherry-pick of #20184) (#20195)

Documentation

  • Add note in docker_environment image field help on tool requirements (Cherry-pick of #20231) (#20235)

  • Remove documentation about new remote caching in 2.19 (#20183)

pants - release_2.18.1rc1

Published by github-actions[bot] 11 months ago

Bug Fixes

  • Fix spurious warnings about Helm interpolations due to incorrect comparison (#20220)

Documentation

  • Add note in docker_environment image field help on tool requirements (Cherry-pick of #20231) (#20234)
pants -

Published by huonw 11 months ago

2.16.1 (Nov 21, 2023)

Only internal changes since prior release.

2.16.1rc4 (Oct 17, 2023)

Bug fixes

  • Fix algorithm for gathering Go build requests with coverage. (Cherry-pick of #20030) (#20032)

2.16.1rc3 (Oct 06, 2023)

Bug fixes

  • Support using __defaults__ in same BUILD file as environment targets. (Cherry-pick of #19446) (#19968)

  • Add missing __init__.py file for the yamllint backend. (Cherry-pick of #19899) (#19908)

  • Add additional directories with register.py to pants bin deps (Cherry pick of #19848) (#19857)

  • Fix global report coverage for namespaced packages (Cherry-pick of #19821) (#19839)

  • Have Pants create the immutable_inputs base parent(s) (Cherry-pick of #19646) (#19653)

  • Use hardlinking when possible for mypy cache (Cherry-pick of #19633) (#19649)

  • Undo pyenv install marking files as RO (Cherry-pick of #19645) (#19647)

  • Use named cache for Docker-env PBS (Cherry-pick of #19611) (#19617)

  • Make mypy cache move truly atomic (Cherry-pick of #19610) (#19614)

  • Scala: support Enums in dependency inference (Cherry pick of #19588) (#19594)

  • Fix the new tool lockfile deprecation message. (cherrypick of #19565) (#19571)

  • Fix golangci-lint runner script (Cherry-pick of #19015) (#19472)

  • Use the package_name variable to fix an UnboundLocalError. (Cherry-pick of #19433) (#19452)

Documentation

  • Update release docs with latest changes (#19895)

  • docs: fix code examples for setting-up-ide and interpreter-compatibility docs (Cherry-pick of #19624) (#19638)

  • docs: add 2.16 entry to changelog (Cherry-pick of #19589) (#19598)

  • Add ruff, adjust pyugprade, autoflake in docs (Cherry-pick of #19555) (#19577)

  • Catch google artifact registry gotcha (Cherry-pick of #19568) (#19569)

  • Stop referring to ~/.cache/pants/setup in CI docs (Cherry-pick of #19554) (#19560)

  • Visibility: documentation fixes and clarifications. (Cherry-pick of #19438) (#19495)

2.16.1rc2 (Sep 23, 2023)

Never released due to build issues.

2.16.1rc1 (Sep 20, 2023)

Never released due to build issues.

2.16.1rc0 (Jul 14, 2023)

Bug Fixes

  • Visibility: fix issue with using target type in verbose rule selector. (Cherry-pick of #19437) (#19457)

  • Fix helm documentation example (Cherry-pick of #19271) (#19310)

Documentation

  • Tweak getting-help docs (Cherry-pick of #19418) (#19420)

  • Refine run_shell_command docs (Cherry-pick of #19413) (#19422)

  • Add a sponsorships page to the docsite. (Cherry-pick of #19412) (#19417)

  • Get doc titles from the in-repo markdown files (Cherry-pick of #19311) (#19320)

  • docs: layout tweak of caching info, remove toolchain :( and additional info about bazel-remote-cache (Cherry-pick of #19299) (#19331)

pants - release_2.20.0.dev0

Published by github-actions[bot] 11 months ago

New Features

  • Code Quality Tool Lib (#20135)

  • Python: Enable code formatting using Ruff (#20098)

  • Add docker image output field to support publish to repository when using BuildKit (#20154)

User API Changes

  • Remove deprecated [export].symlink_python_virtualenv option (#20214)

Plugin API Changes

  • Remove deprecated @rule_helper (#20213)

Bug Fixes

  • Skip jvm dependencies without entries (#20192)

  • Support inferring JS deps from export ... from ... statements (#20190)

  • Remove print() statement (#20196)

  • Do not choke on values from macros on environment targets during bootstrap. (#20191)

  • Use a Zulu JDK 8 to run the Kotlin analyzer. (#20184)

  • Fix: support helm repos with trailing slashes (#20177)

pants - release_2.18.1rc0

Published by github-actions[bot] 11 months ago

Bug Fixes

  • Silence warnings about internal call of deprecated Helm function on 2.18 (#20217)

  • Skip jvm dependencies without entries (Cherry-pick of #20192) (#20212)

  • Resolve appropriate Scala artifacts for BSP (Cherry-pick of #20157) (#20163)

  • Do not choke on values from macros on environment targets during bootstrap. (Cherry-pick of #20191) (#20199)

  • Use a Zulu JDK 8 to run the Kotlin analyzer. (Cherry-pick of #20184) (#20194)

pants - release_2.17.1

Published by github-actions[bot] 12 months ago

The second stable release of the 2.17.x series, with only documentation changes since the previous rc!

pants - release_2.18.0

Published by github-actions[bot] 12 months ago

❗❗❗ This project is no longer being released via PyPI, and is instead released via GitHub Releases. See https://github.com/pantsbuild/pants/releases

Individuals and companies can now sponsor Pants financially.

Pants is an open-source project that is not owned or controlled by any one company or organization, and does incur some expenses. These expenses are managed by Pants Build, a non-profit that was established for this purpose. This non-profit's only source of revenue is sponsorship by individuals and companies that use Pants.

We offer formal sponsorship tiers for companies, as well as individual sponsorships via GitHub.

What's New

Highlights

  • The improvements to AWS Lambda and Google Cloud Function support in 2.17 have continued in 2.18, including simpler configuration and support for AWS Lambda Layers.
  • Many more options can now be controlled when building Docker images.
  • Significant feature work and bug fixes to "deploy" backends like Helm and Terraform.

Keep reading to see the details and what's also included.

Overall

The pants launcher binary is now required to run Pants. It must be version 0.10.0 or greater: run PANTS_BOOTSTRAP_VERSION=report pants to check and SCIE_BOOT=update pants to upgrade to the latest. Pants 2.18 and later are not distributed via PyPI, and thus the launcher is required to coordinate downloading the appropriate versions from GitHub Releases.

The [cli.alias] section of pants.toml now supports defining flag-like aliases. For example: --all-changed = "--changed-since=HEAD --changed-dependents=transitive".

The paths goal now supports passing groups of targets to --from and/or --to.

The help goal now supports showing help for an environment variable. For example: pants help PANTS_FIX_ONLY.

Additional bug fixes:

  • The client now detects changes in pants configuration that require restarting the pants daemon.
  • Sequences of goals that mutate files on disk and then immediately re-read them now no longer fail spuriously if the second goal happens faster than the OS file-change notification is received. For instance, pants fix lint :: would sometimes run the lint goal on the files before the fix changes were applied.
  • More reliable detection of when optimised hard-linking can be used for creating sandboxes. For instance, no longer hitting errors when a single device is mounted multiple times.

The deprecation for referring to a "secondary" owner target via the file name has expired, and so this is no longer supported. For example, if path/to/main.py is the entry point of the path/to:binary pex_binary target, an invocation like pants package path/to/main.py must now use the target address instead: pants package path/to:binary.

BUILD files

Several bug fixes:

  • Better error messages when a BUILD file refers to an unknown value.
  • __defaults__ can now be used in the same BUILD file as environment targets like local_environment.

Performance

Memory usage has been reduced, particularly for the Go backend.

A best-effort limit has been placed on the number of open cache file handles (approximately 1000), reducing the need for ulimit adjustments.

Remote caching/execution

Remote caching using the gRPC remote execution API now supports mTLS, via the new remote_client_certs_path and remote_client_key_path options in the [GLOBAL] section.

Backends

Several backends that were intended to be included in previous releases were accidentally missing from the released pants artifacts, these are now available in 2.18:

  • pants.backend.experimental.openapi.codegen.java: Enables generating Java from OpenAPI.
  • pants.backend.experimental.python.framework.django: Enables better support for projects using Django.
  • pants.backend.experimental.swift: Enables core Swift support.
  • pants.backend.python.providers.experimental.pyenv.custom_install: Enables customising how the pyenv provider builds a Python interpreter.

In addition, the documentation of backends now lists all backends, including preview ones that were not previously advertised. Please go check it out, try backends relevant to you and let us know how they go for your use cases, report bugs and/or submit fixes!

Docker

More options can be passed when building images (see and docs for more details:

Additional features and bug fixes:

  • Registries with the same address no longer silently overwrite each other, and instead now emit an error.
  • The secrets field now supports expanding ~ to refer to the current user's home directory.
  • The image_tags field now has an explanatory error if it is incorrectly empty.

Helm

The helm_unittest_tests target has had several improvements:

  • support for being added by the tailor goal (this can be disabled with the new [helm].tailor_unittests option)
  • support for snapshot testing via the new generate-snapshots goal

The new pants.backend.experimental.helm.check.kubeconform backend allows running Kubeconform on helm_chart and helm_deployment targets as part of the check goal.

Deprecations:

  • The helm_deployment target should now specify the new chart field to explicitly indicate which chart is being deployed.
  • The create_namespace field for helm_deployment will not be supported in future, use the passthrough argument --create-namespace instead.
  • The {env.VAR_NAME} interpolation syntax some fields of helm_deployment has been replaced by the more general env build file function; for instance "text-{env.VAR_NAME}" can become f"text-{env('VAR_NAME')}".
  • The [helm].tailor option has been renamed to tailor_charts.

Additional features and bug fixes:

  • Relative target addresses for docker_images can be passed like helm_deployment(values={"some_image": ":target-name"}), and are expanded in the same way as non-relative addreses path/to:target-name.
  • If the passthrough --debug argument is specified, like pants experimental-deploy path/to:helm-deployment -- --debug, that flag is now passed to all Helm invocations pants does.
  • The Helm binary has been upgraded to 3.12.3 by default.
  • The new version field to helm_chart allows overriding the version in Chart.yaml.

JavaScript

The node_build_script function now supports extra_env_vars to specify additional environment variables when executing.

Node-based tools can now install from a user-provided 'resolve'/package.json, similar to Python tools.

The dependency inference for JavaScript has been rewritten into Rust, and thus runs much faster.

Python

The functions-as-a-service (FaaS) backends, pants.backend.awslambda.python and pants.backend.google_cloud_function.python have seen more improvements in 2.18:

  • Deprecation: the python_awslambda target has been renamed to python_aws_lambda_function.
  • Deprecation: the [lambdex].layout = "zip" value in pants.toml is now the default, and the [lambdex] section should be removed.
  • New: the python_aws_lambda_layer target can be used to build Layers for AWS Lambda.
  • New: the runtime field is no longer necessary when the interpreter constraints unambiguously refer to an entire single major version. For instance, with [python].interpreter_constraints = ["==3.11.*"], one doesn't need to specify runtime="python3.11" to python_aws_lambda_function or runtime="python311" to python_google_cloud_function, as it will be inferred.
  • New: for AWS Lambda targets, the complete_platforms argument now has default values provided by Pants, which gives more reliable builds, especially when building on a different platform than the AWS Lambda itself. This change also means that only one of the complete_platforms or platforms fields should be provided.

The new, faster parser for dependency inference is now the default, so the [python-infer].use_rust_parser option can be removed from pants.toml, if it is being explicitly set to true. The old parser is deprecated and will be removed: follow the warnings in 2.17 to move to the new parser.

The new pants.backend.experimental.python.typecheck.pytype backend allows running the pytype type checker as part of the check goal.

Additional features and bug fixes:

  • The tailor goal now supports automatically creating python_requirements targets for in pyproject.toml files that follow PEP 621 to specify dependencies.
  • Imports within a with contextlib.suppress(ImportError): ... construct are now considered weak imports.
  • The global coverage report now correctly handles namespaced packages.
  • pex_binary targets that consume python_distribution targets now work with just the distributions, not their transitive dependencies (the files that are used to build the distribution).
  • Pants now emits an error if isort cannot read its configuration file (NB. isort itself emits warnings for this, but they would not be visible when running isort under the default Pants configuration).
  • The pants.backend.python.typecheck.mypy backend is now more resilient to its cache being removed.

Some deprecations have expired and the supporting code has been removed:

  • the "old style" tool lockfiles are no longer supported, and instead customising the versions/installation of tools like black, mypy and pytest should configure a "normal" resolve
  • using pants export without a --resolve flag is no longer supported, always pass that flag

Go

Memory usage has been reduced.

Go processes are now cached using the full version of the Go compiler (for example, go1.20.6) so that artifacts are not incorrectly reused between different patch versions.

Building with coverage no longer has an exponential blow-up when preparing the build requests.

JVM

The deprecation for the excludes field on jvm_artifact has expired, use exclusions instead.

The coursier tool now uses v2.1.6 by default, and, for this version, supports a native binary on ARM macOS (Apple Silicon).

The deploy_jar target now supports an exclude_files field.

NEW: Rust

The new pants.backend.experimental.rust backend has been added, with support for using rustfmt to format Rust source files.

Scala

The new scala_artifact target can be used to track third-party artifacts from Scala, with Pants then understanding how Scala artifacts include the Scala version in their coordinates.

Shell

The shellcheck binary for the pants.backend.shell.lint.shellcheck backend is now fetched from vscode-shellcheck, and thus now supports AArch64 macOS (Apple Silicon) natively.

The deprecations for the pre-2.16 target names have expired, and thus these have been removed:

  • experimental_shell_command: use shell_command
  • experimental_run_shell_command: use run_shell_command

Terraform

The new terraform_deployment target allows configuring a terraform_module to be deployed with the experimental-deploy goal.

A new pants.backend.experimental.terraform.lint.tfsec backend has been added to run the tfsec linter as part of the lint goal.

The check goal now runs terraform init to ensure modules are installed before validating.

Visibility

The pants.backend.experimental.visibility backend is now also runs as a linter, such as when running pants lint ::, to report all visibility violations at one time.

Visibility rules about dependencies in the root of the repository are now supported.

Plugin API Changes

Pants no longer publishes wheels to PyPI. The only supported way to depend on pants itself is the pants_requirements target, which now supports a new version_spec field if one needs to depend on a different version of Pants than the currently executing one.

The include_special_cased_deps flag (on DependenciesRequest, TransitiveTargetsRequest, and CoarsenedTargetsRequest) is replaced with should_traverse_deps_predicate. If set to True, use should_traverse_deps_predicate=pants.engine.target.AlwaysTraverseDeps() instead. See #19272 and #19387 for details.

The TestResult stdout and stderr fields have been renamed to stdout_bytes and stderr_bytes, and store bytes instead of str, to handle non-UTF-8 data without crashing.

Other changes:

  • Plugins can now declare additional requirements in a requirements.txt file next to register.py.
  • Pants only supports running on Python 3.9 now.
  • Named caches can now used digits in addition to lower-case letters and underscores.
  • The pants.core.goals.package.TraverseIfNotPackageTarget type can be used with the new should_traverse_deps_predicate to treat packageable targets as "leaves" when finding dependencies; for instance, stopping at a pex_binary without also surfacing the python_sources that are used for it.

The deprecations for many request types has expired (follow instructions in warnings in 2.17 to resolve), so they are now removed: AllAssetTargetsRequest, AllTargetsRequest, BashBinaryRequest, CatBinaryRequest, CGoCompilerWrapperScriptRequest, ChmodBinaryRequest, DiffBinaryRequest, DjangoAppsRequest, DockerBinaryRequest, GitBinaryRequest, GunzipBinaryRequest, MkdirBinaryRequest, PythonBinary, ReadlinkBinaryRequest, TarBinaryRequest, UnzipBinaryRequest, ZipBinaryRequest.

Full Changelog

For the full changelog, see the individual GitHub Releases for this series: https://github.com/pantsbuild/pants/releases

pants - release_2.19.0a0

Published by github-actions[bot] 12 months ago

New Features

  • Support grouping parametrizations (#20065)

  • Parametrizable plugin fields for target generators (#20059)

  • Add exclude_files field to deploy_jar target (#20075)

User API Changes

  • Discover ASDF interpreters by default (#20105)

Bug Fixes

  • Resolve appropriate Scala artifacts for BSP (#20157)

  • Fix protobuf_sources with parametrized python_resolve (#20069)

  • Fix mypy cache dir not being created (#20139)

Documentation

  • Update docs with get-pants.sh new install location: ~/.local/bin (#20155)

  • Initial sketch of what's new in 2.18 (#19999)

  • Avoid quotes in suggested .env file for IDEs (#20144)

pants - release_2.18.0rc5

Published by github-actions[bot] 12 months ago

New Features

  • Add exclude_files field to deploy_jar target (Cherry-pick of #20075) (#20126)

Bug Fixes

  • Fix mypy cache dir not being created (Cherry-pick of #20139) (#20142)

  • The pants native client should respect the PANTS_BUILDROOT_OVERRIDE provided by scie-pants. (Cherry-pick of #20112) (#20124)

Documentation

  • Initial sketch of what's new in 2.18 (Cherry-pick of #19999) (#20147)

  • Avoid quotes in suggested .env file for IDEs (Cherry-pick of #20144) (#20146)

pants - release_2.19.0.dev4

Published by github-actions[bot] 12 months ago

New Features

  • Add TransitivelyExcludeDependenciesRequest to mirror user-provided values (#20080)

  • Use ambiguity-resolution for Python protobuf/grpc dependency inference (#19939)

  • Configurable override of url generation for External Tool versions (#20074)

Plugin API Changes

  • Plumb the hidden _find_links through non-resolve Pex invocations (#20085)

Bug Fixes

  • The pants native client should respect the PANTS_BUILDROOT_OVERRIDE provided by scie-pants. (#20112)

  • Make CompletePexEnvironment.environment_dict accept PATH from subprocess-environment (#20082)

  • Fix coursier download for arm64, bumps default to v2.1.6 (#19940)

  • Add best-effort limits on async file opens to reduce file handle counts (#20055)

Documentation

  • vscode: add rust settings to suggested configuration in docs (#20094)

  • Revert "Create the README file in german (#20070)" (#20083)

  • Create the README file in german (#20070)

pants - release_2.17.1rc3

Published by github-actions[bot] 12 months ago

Bug Fixes

  • Add best-effort limits on async file opens to reduce file handle counts (Cherry-pick of #20055) (#20078)