commit | 6f43e6f347117cd0a99f2c6570a2886f8587f22e | [log] [tgz] |
---|---|---|
author | Googler <jhorvitz@google.com> | Wed Feb 22 09:06:31 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Feb 22 09:07:52 2023 -0800 |
tree | 6679ae8776c7d4f20481d24754e98c3c92b23fe6 | |
parent | 8bf60573c3c166cc45899166fa71fb36e31a2f38 [diff] |
Avoid storing a rule's name in `AttributeContainer`. The rule's name is already accessible from the `Rule#getName` method which looks at the rule's label, so it is not necessary to spend additional storage on the name. To service requests for the name attribute, `Rule` special-cases for `name`, similar to how it already special-cased for `generator_function` and `generator_location`. For consistency, `RuleClass` now checks that the `name` attribute is always at index 0. This is already the case in practice, since rule classes created through `RuleClass.Builder` add `name` first. The only place that needed updating was `RuleClassTest`, which invokes the `@VisibleForTesting` constructor directly. PiperOrigin-RevId: 511511515 Change-Id: I3f34bea0e8bdf8bfece767bd5df3933c94a3464d
{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