Skip to content

refactor(toolchains): share Python version config settings - #4159

Open
dzbarsky wants to merge 2 commits into
bazel-contrib:mainfrom
dzbarsky:deduplicate-python-toolchain-version-settings
Open

refactor(toolchains): share Python version config settings#4159
dzbarsky wants to merge 2 commits into
bazel-contrib:mainfrom
dzbarsky:deduplicate-python-toolchain-version-settings

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Generated toolchain BUILD files repeat Python version config_setting predicates for each suite. toolchain_suites_content now emits each distinct predicate once and passes its label to py_toolchain_suite, preserving version matching while reducing retained configuration data.

In our repo, this removes 79MB of retained heap.

Validation: buildifier -mode=check on the three changed files and git diff --check passed. bazel test --config=fast-tests --jobs=4 //tests/toolchains/... //tests/config_settings/... passed (36 passed, 1 skipped).

Generate each distinct Python version and flag predicate once per toolchain repository and reuse it across py_toolchain_suite calls.

In our repo, this removes 79MB of retained heap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant