commit | 321b42e177ef48e703f379a7f35835c9ab564280 | [log] [tgz] |
---|---|---|
author | nharmata <nharmata@google.com> | Fri Apr 29 13:12:30 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Apr 29 13:13:51 2022 -0700 |
tree | a694e125525dda4f85a5f17dc9e7d2bcf740e615 | |
parent | fbcb47e46d8ed2f09a3613ad4bb0d86abae03a49 [diff] |
Fix a narrow non-determinism bug in package loading. The symptom of the bug is that the location assigned to input file targets Blaze implicitly creates is non-deterministic among the rule instance targets that specify the input file. The correct behavior is to choose the location of the first such rule instance target (wrt the order in which they were instantiated). This non-determinism was introduced in https://github.com/bazelbuild/bazel/commit/736707833d94613e5da8e4adc32e8146bc4bc307. This CL here reverts part of that CL. In order to fix this cleanly I also had to fix an existing bug with the hacky `#replaceTarget` (used only by `WorkspaceFileFunction`, which implements Bazel's `WORKSPACE` feature) that didn't matter in practice because the old `#getRules` implementation dodged it. The issue here was caught by existing tests, so that's nice at least. PiperOrigin-RevId: 445489517
{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