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

Fixes for the Starlark transition hash computation #14251

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Nov 9, 2021

@Wyverald These two commits fix a whole cluster of issues around wrongly calculated transition hashes, leading to action conflicts on otherwise correct builds. I think they would be very useful to have in Bazel 5.

@sdtwigg FYI

twigg added 2 commits November 9, 2021 23:36
…nValue

As per discussion in b/203470434, transitionDirectoryNameFragment should completely depend on the current values of the (rest of) the BuildOptions class. Thus, it is far better to have this always computed from BuildOptions when building a BuildConfigurationValue  than rely on users keeping it consistent. (Other results of BuildConfigurationValue itself are themselves wholly computed from BuildOptions so placement there is a natural fit.)

This naturally fixes the exec transition forgetting to update transitionDirectoryNameFragment.

This fixes and subsumes bazelbuild#13464 and bazelbuild#13915, respectively. This is related to bazelbuild#14023

PiperOrigin-RevId: 407913175
…lculating ST-hash

Previously, the hash calculation was skipping including StarlarkOptions that happened to be at their default values.

This is wrong since those values may still be in "affected by Starlark transition" (because either the commandline set them and the Starlark transition reset them to their Starlark defaults thus still requiring a hash change OR the commandline did not set them but a series of Starlark transitions did an default->B->default anyways causing the Starlark option to still be 'stuck' in "affected by Starlark transition").

Resolves bazelbuild#14239

PiperOrigin-RevId: 408701552
@google-cla google-cla bot added the cla: yes label Nov 9, 2021
@Wyverald Wyverald merged commit 557a7e7 into bazelbuild:release-5.0.0rc1 Nov 11, 2021
@Wyverald
Copy link
Member

Thanks!

@fmeum fmeum deleted the release-5.0.0rc1 branch January 26, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants