Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BuildOptions immutable #6723

Closed
gregestren opened this issue Nov 20, 2018 · 2 comments
Closed

Make BuildOptions immutable #6723

gregestren opened this issue Nov 20, 2018 · 2 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Configurability platforms, toolchains, cquery, select(), config transitions type: process

Comments

@gregestren
Copy link
Contributor

gregestren commented Nov 20, 2018

Configuration transitions, which are a core building block of same-build multiplatform builds, work by transforming an input set of BuildOptions into an appropriate output set.

It's important that this transformation doesn't mutate the input set, since that would inadvertently apply the changes to the source configuration, which messes the whole transition up (in a best case) and destroys Bazel's internals (in a worst).

Unfortunately, the BuildOptions class isn't immutable. And it isn't easy to make it immutable with the way it's currently used.

Starlark build configuration should eventually refactor this severely enough to make it naturally immutable. This issue tracks both that sub-effect (as a subset of #5574) and interim efforts to "harden up" BuildOptions today to at least make it "inconvenient" to mutate if not totally impossible.

@gregestren gregestren added team-Configurability platforms, toolchains, cquery, select(), config transitions P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Nov 20, 2018
bazel-io pushed a commit that referenced this issue Nov 21, 2018
Addresses #6723

PiperOrigin-RevId: 222464467
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 26, 2023
@github-actions
Copy link

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Configurability platforms, toolchains, cquery, select(), config transitions type: process
Projects
None yet
Development

No branches or pull requests

1 participant