forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve cache reuse for
./pants package
when using a constraints fi…
…le or lockfile (pantsbuild#12807) Improves upon the solution from pantsbuild#12076. There are some args like `--manylinux` that we need to use both with the lockfile.pex and the final `PexFromTargets`. But many others like `--strip-pex-env` are irrelevant for the lockfile.pex, and we only need to set on the final PEX. WIth this diff: ```diff diff --git a/build-support/bin/BUILD b/build-support/bin/BUILD index d9751179b..2a6e76478 100644 --- a/build-support/bin/BUILD +++ b/build-support/bin/BUILD @@ -17,4 +17,4 @@ pex_binary(name="generate_docs", entry_point="generate_docs.py", dependencies=[" pex_binary(name="generate_github_workflows", entry_point="generate_github_workflows.py") pex_binary(name="generate_user_list", entry_point="generate_user_list.py", dependencies=[":user_list_templates"]) pex_binary(name="release_helper", entry_point="_release_helper.py") -pex_binary(name="reversion", entry_point="reversion.py") +pex_binary(name="reversion", entry_point="reversion.py", always_write_cache=True) ``` Before: ``` ❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin: ... 23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt 23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt ``` After: ``` ❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin: ... 23:49:14.07 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt ... ``` [ci skip-rust] [ci skip-build-wheels]
- Loading branch information
1 parent
381db29
commit 42f4d0a
Showing
3 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters