Skip to content

Conversation

@cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Sep 11, 2024

The commits step through updating from 2.20 to 2.21 to 2.22.

Interesting new features in 2.21

A new [export].py_hermetic_scripts feature allows us to use nosetest in the exported venv. This was added in:

Note: The hermetic scripts option will be renamed to [export].py_non_hermetic_scripts_in_resolve in 2.23:

This release also allows us to simplify our __defaults__ BUILD file config. Instead of specifying (python_test, python_tests), we can just use python_test because now applies to generated targets (python_tests generates python_test targets), not just the targets in BUILD files.

Interesting new features in 2.22

A new [export].py_generated_sources_in_resolve option. I don't think we really need this now, but it makes sense to make any generated sources available in the venv (for use by an IDE like VSCode).

The options system is moving to the rust-based pants engine instead of in python to speed up cli args parsing. This release only runs the new system in parallel with the old options parser in 2.22. In v2.24 (or so), pants will switch to the new options parser.

pants-plugins lockfile diffs

From 2.20 to 2.21

Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  ijson                          3.1.4        -->   3.2.3
  pantsbuild-pants               2.20.4       -->   2.21.1
  pantsbuild-pants-testutil      2.20.4       -->   2.21.1
  pex                            2.2.1        -->   2.3.1

From 2.21 to 2.22

Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]
                                                                  
==                    Upgraded dependencies                     ==

  pantsbuild-pants               2.21.1       -->   2.22.0
  pantsbuild-pants-testutil      2.21.1       -->   2.22.0

Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  ijson                          3.1.4        -->   3.2.3
  pantsbuild-pants               2.20.4       -->   2.21.1
  pantsbuild-pants-testutil      2.20.4       -->   2.21.1
  pex                            2.2.1        -->   2.3.1
With this change, nosetest will be usable in the exported venv
until we finish migrating from nosetest to pytest.

By default, pex modifies script shebangs to add '-sE'.
This breaks nosetest and anything that needs PYTHONPATH.
pants 2.21 makes it possible to set __defaults__ more simply because the
defaults now apply to generated targets (eg a python_test target
generated by a python_tests target), instead of just the targets
explicitly defined in BUILD files.
Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  pantsbuild-pants               2.21.1       -->   2.22.0
  pantsbuild-pants-testutil      2.21.1       -->   2.22.0
@cognifloyd cognifloyd added this to the pants milestone Sep 11, 2024
@cognifloyd cognifloyd requested review from a team, mamercad, nzlosh and winem September 11, 2024 20:59
@cognifloyd cognifloyd self-assigned this Sep 11, 2024
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Sep 11, 2024
@cognifloyd cognifloyd requested review from a team September 12, 2024 15:09
Copy link
Contributor

@nzlosh nzlosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cognifloyd cognifloyd merged commit 6326a85 into master Sep 12, 2024
@cognifloyd cognifloyd deleted the pants-upgrade-2.22 branch September 12, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure: ci/cd pantsbuild size/L PR that changes 100-499 lines. Requires some effort to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants