commit | 49862c5fa66f65deb513ee938d3d052b9e4cfbbe | [log] [tgz] |
---|---|---|
author | juliexxia <juliexxia@google.com> | Thu Jun 13 12:39:08 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jun 13 12:40:11 2019 -0700 |
tree | 8a89bc9e4d5e53990b0b15ccc20374510b66594f | |
parent | 76e4e423cae9063ee309dacc708695e721cd3f54 [diff] |
Don't allow ctx.split_attr to access starlark transitions attributes. Currently the split_attr struct building logic does its own transition application outside of ConfigurationResolver#applyTransition. That means we don't do proper Starlark transition set up and tear down. split_attr is also broken with starlark attr transitions because it always keys splits on cpu (regardless of what they're actually keyed on). This bug has shown itself through two symptoms: (1) split_attr not keying on expected keys (2) Starlark transitions sometimes throwing errors if its not properly set up (i.e. defaults not loaded so can't find and use default values of build settings). What's concerning about this symptom is that there's no logic around the split_attr building for printing these errors. That has to happen by calling StarlarkTransition#replayEvents. This method is only called in in ConfigurationResolver#applyTransition SO it would seem that transitions are maintaining state between split_attr building and configuration resolution which is probably (?) not great. Furthermore, these errors are only printing ~some~ of the time. So we're nondeterministically erroring out which is even more not great. This CL prevents users from running into these two symptoms with a helpful error message. But both will require follow up. PiperOrigin-RevId: 253084578
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md
Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.