Bot releases are hidden (Show)
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by thejcannon about 1 year ago
Published by kaos over 1 year ago
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)
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)
Visibility: fix issue with using target type in verbose rule selector. (Cherry-pick of #19437) (#19456)
Use the "package_name" variable to fix an UnboundLocalError. (Cherry-pick of #19433) (#19453)
Fix helm documentation example (Cherry-pick of #19271) (#19313)
Tweak getting-help docs (Cherry-pick of #19418) (#19419)
Refine run_shell_command
docs (Cherry-pick of #19413) (#19421)
Add a sponsorships page to the docsite. (Cherry-pick of #19412) (#19416)
Get doc titles from the in-repo markdown files (Cherry-pick of #19311) (#19321)
docs: layout tweak of caching info, remove toolchain :( and additional info about bazel-remote-cache (Cherry-pick of #19299) (#19329)
turn path/BUILD
into path
in the tailor
goal (#19323)
Terraform: Add experimental-deploy
and wire-in dependency inference (#19185)
add support for alias-flags (#19034)
Add environment variable help options (#19078)
Add build_network option to docker_image target (#19354)
PythonBinary
type. (#19399)docs: recommend scie-pants on upgrade tips page (#19139)
docs: fix markdown inconsistencies (#19363)
docs: apply suggested edits to guide docs from readme.com (#19374)
docs: add style guide instructions for writing Python help strings (#19365)
docs: update plugin writing tutorials (#19369)
docs: fix markdown inconsistencies (#19359)
The first stable release of the series, with no changes since the previous rc
!
The new env
function in BUILD files allows access to environment variables in BUILD files.
Run pants help symbols
for documentation of all builtin symbols and macros provided by prelude files
which are usable in BUILD files.
The visibility rules syntax now supports matching on target names. The rules glob syntax also now uses
the same syntax as target selectors.
The {pants.hash}
generation code was changed such that the generated hash for the same input will be different in pants 2.16.
The Python backend added or improved support for various tools including:
pydocstyle
is now supported for linting Python doc strings. Enable the
pants.backend.python.lint.pydocstyle
backend to add this support.
ruff
is now supported for linting and formatting Python code. Enable the
pants.backend.experimental.python.lint.ruff
backend to add this support.
pyenv
is now supported as a way for Pants to provide a hermetic version of Python
for each relevant Interpreter required to run user code. Enable the pants.backend.python.providers.experimental.pyenv
backend to add this support.
Pants now understands how to parse dependencies of projects using the OpenStack/Stevedore ((https://github.com/openstack/stevedore)
project. Enable the pants.backend.python.framework.stevedore
backend to add this support.
More Python target types now have the environment
field and thus can execute in non-local environments.
The default value of CPython>=3.7,<4
for the [python].interpreter_constraints
option is now
deprecated and will be removed in Pants v2.17.x. This options sets Python interpreter
constraints for Python-related targets which did not otherwise specify their own interpreter
constraints. Instead of relying on this default, explicitly set the
[python].interpreter_constraints
option appropriately. We recommend constraining to a single
interpreter minor version if you can, e.g., interpreter_constraints = ['==3.11.*']
, or at least
a small number of interpreter minor versions, e.g., interpreter_constraints = ['>=3.10,<3.12']
.
The special Python "tool lockfile" functionality is deprecated. Repos can now use regular "user lockfiles" to provide custom versions of tools.
The Shell backend along with the new pants.backend.experimental.adhoc
backend have received a number of improvements so that
Pants is able to invoke workflows that include tools for which Pants does not yet have a
dedicated backend.
In recognition of these improvements, the experimental_shell_command
and experimental_run_shell_command
target types have
graduated to no longer have the experimental_
prefix; deprecating the prefixed variants with removal in 2.17. Upgrade to use
shell_command
and run_shell_command
respectively instead.
The improvements include:
The shell_command
continues to provide a way to run a tool for its side effects and capture
outputs from the tool invocation for consumption as dependencies by other target types, but has had several improvements:
dependencies
field has been deprecated, and separated into three fields: execution_dependencies
foroutput_dependencies
for dependencies required torunnable_dependencies
for targets that need to exist as directlyPATH
outputs
field has been separated into output_files
and output_directories
workdir
fieldroot_output_directory
fieldPreserving symlinks as symlinks in process output, rather than resolving them to their target
file. This eliminates the need for work-arounds in shell_command
s that happen to generate
semantically-relevant symlinks, such as the contents of node_modules/.bin
if using shell_command
to invoke npm ci
or npm install
.
The new adhoc_tool
target type supplied by the adhoc
backend allows executing most "runnable" target types (those supported for pants run
goal) exported by another Pants backend in an execution sandbox goal, allowing you to capture their outputs to be captured. The outputs can then be consumed by another Pants target in a similar manner to the shell_command
target type.
"Runnable" target types include:
system_binary
docker_image
go_binary
jvm_artifact
, and deploy_jar
pex_binary
, python_requirement
, python_source
, and pyoxidizer_binary
The new system_binary
target type supplied by the adhoc
backend wraps any externally-managed tool so that the
tool may be invoked as a "runnable" by the adhoc_tool
target type, while also allowing tool versions to be pinned for reproducibility.
Support for running in non-local environments as specified by the environment
field on shell_command
, adhoc_tool
, and related target types.
Defining arbitrary shell commands as tests which can be invoked using pants test
via the
new experimental_test_shell_command
target type.
The workdir
field to run_shell_command
has been switched to match the documented behavior: it now runs from the same directory as the BUILD
file by default. To preserve the old behavior, explicitly set workdir="/"
. The stabilisation also fixes other bugs with relative paths passed to the workdir
field and thus may require updates.
Ad-hoc tool support, with the adhoc_tool
or shell_command
targets, can be used to compile third party
libraries in unsupported languages, run tools from ecosystems Pants doesn't yet directly support, and other similar code-generation tasks.
These targets can be used for first-party code generation, making use of existing backends that define
"runnable" targets if needed. For instance, exporting a OpenAPI schema from a Python API server, letting Pants
manage the interpreters and dependencies required.
Enable the pants.backend.experimental.adhoc
backend to add the features supplied by the adhoc
backend.
Enable the pants.backend.shell
backend for the shell-related functionality including shell_command
and
run_shell_command
target types.
The Go backend has received a large number of changes in order to be ready for Go v1.20
and to make continued progress on stabilizing the Go backend.
The main change is that Pants will now compile Go SDK packages from scratch and no longer rely on
the prebuilt package archives distributed with the Go SDK. Go v1.20 will no longer ship with those
prebuilt package archives, and so this change was necessary for Pants to continue to work
with Go v1.20 and later releases. (It is also a correctness issue since Pants will now be able to
apply compiler options consistently to both first-party Go code and Go SDK packages.)
The Pants team would appreciate if the community could try out 2.16.x with your Go code as an additional
check to ensure there are no regressions.
The Go backend also now supports:
environment
field available now on go_binary
targets.--go-test-cover-packages
option.race
field now available on go_binary
targets.compiler_flags
, linker_flags
, and assembler_flags
fieldsPants is now able to discover and supply configuration files for the Buf
protobuf linter.
The new "preamble" plugin allows formatting/linting files to ensure they start with specific text, such as a copyright header. Enable the
pants.backend.tools.preamble
backend to add this support.
Pants now have basic support for the CUE language for defining, generating, and validating configuration data.
Enable the pants.backend.experimental.cue
backend to use this support.
Pants now the supports the yamllint linter for YAML files. Enable the pants.backend.experimental.tools.yamllint
backend to add this support.
Pants now supports referencing S3 URLs via the scheme (E.g. s3://
), or authority (E.g. *.s3*amazonaws.com
or s3.*amazonaws.com
)
anywhere a URL can be specified.
Credentials are loaded similar to the AWS CLI (most regularly ~/.aws/credentials
) and attached as headers in the request (which aren't cached or logged).
Enable the pants.backend.url_handlers.s3
backend to add this support.
The URLDownloadHandler
union has been added to allow plugins to modify native URL downloading, such as transforming the URL or attaching headers for auth.
The frozen_after_init
decorator on dataclasses has been removed from many parts of the Pants codebase. Plugin authors should avoid use of this decorator because it will likely be removed in a future Pants version.
The deprecated Platform.current
has been removed. Instead, have the affected rules take a Platform
directly as a parameter and the engine will supply the relevant Platform
instance.
The ToolCustomLockfile
and ToolDefaultLockfile
classes have been removed.