Skip to content

Commit

Permalink
make_py_package: don't mutate dep_artifacts
Browse files Browse the repository at this point in the history
Summary: mutating dep_artifact like this causes it to grow between invocations of `_pex_modules_args`. This causes bytecodes to accumulate unnecessarily for different subtargets.

Reviewed By: IanChilds

Differential Revision: D64465025

fbshipit-source-id: 6a12a9bab4cf6279607ede2a6d7f01b3c77f8b27
  • Loading branch information
zsol authored and facebook-github-bot committed Oct 16, 2024
1 parent d955796 commit 26e7c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/make_py_package.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def _pex_modules_args(
if pex_modules.compile:
pyc_mode = PycInvalidationMode("UNCHECKED_HASH") if symlink_tree_path == None else PycInvalidationMode("CHECKED_HASH")
bytecode_manifests = pex_modules.manifests.bytecode_manifests(pyc_mode)
dep_artifacts.extend([a[0] for a in pex_modules.manifests.bytecode_artifacts_with_paths(pyc_mode)])
dep_artifacts = dep_artifacts + [a[0] for a in pex_modules.manifests.bytecode_artifacts_with_paths(pyc_mode)]

bytecode_manifests_path = ctx.actions.write(
"__bytecode_manifests{}.txt".format(output_suffix),
Expand Down

0 comments on commit 26e7c9a

Please sign in to comment.