commit | b2cca31705419ba1cd3744c23be4b1d9bdb5c467 | [log] [tgz] |
---|---|---|
author | Googler <gregce@google.com> | Mon Nov 27 17:03:10 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Nov 27 17:04:57 2023 -0800 |
tree | b9e81f87f411f0ac28e6d3b63bc6ee3096b2f5ea | |
parent | 24548120daeeafdcce3667259bc69bc423493a2f [diff] |
Don't crash when loading a non-existent exec transition .bzl file. i.e. `$ bazel build //foo --experimental_exec_config=//bar/does_not_exist.bzl%my_transition` This is a small change but has lots of files because I had to move `BzlLoadFailedException` into its own class. So a lot of simple reference updates. Details: - `StarlarkExecTransitionLoader` is responsible for loading the exec transition. - It delegates to `BzlLoadFunction` to load the `bzl` file. - I need `StarlarkExecTransitionLoader` to anticipate `BzlLoadFailedException`. - I moved `BzlLoadFailedException` out of `BzlLoadFunction` to avoid a build dependency cycle: `BzlLoadFunction` is part of the catch-call `:skyframe_cluster` library, which itself depends on `StarlarkExecTransitionLoader`. - Kept a bunch of static `BzlLoadFailedException` instantiators in `BzlLoadFunction`. Many of these involve higher order types with the same dependency issues. - Updated the `BzlFileLoader` interface (which wraps `BzlLoadFunction` calls) to throw `BzlLoadFailedException`. - Updated `BzlFileLoader` implementations to check for that exception when Skyframe-evaluating. - Uncommented the test checking this functionality. PiperOrigin-RevId: 585800246 Change-Id: I71921380a658eb6c441b2600f0758049162f85c0
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only 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:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md