commit | 67f22fa432475f6c4fe5ea566b8fcc03b9a5f01a | [log] [tgz] |
---|---|---|
author | Googler <wyv@google.com> | Mon Jun 13 11:26:45 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Jun 13 11:28:02 2022 -0700 |
tree | 85c5b99d497511739001ae06dc3a7ff26c5fbd18 | |
parent | 24e1cc93fe5bb0186ddc6ba64a8cc4cc7236902c [diff] |
LabelConverter cleanup - LabelConverter doesn't actually need a base Label; it just needs a base package. Changed the constructor to take a PackageIdentifier. - Nobody ever actually reuses a "convertedLabelsInPackage" map; such a map is only ever created once per Package.Builder, or per LabelConverter instance. We can simply construct a LabelConverter in Package.Builder and just get rid of this cache map as an input parameter. - This also means that convertedLabelsInPackage can be removed from BazelStarlarkContext. - Fixed LabelConverter tests and documentation accordingly. - As a next step, we should actually change the "context" parameter of `Type.convert(Object x, Object what, Object context)` to *always* be a LabelConverter, perhaps even non-nullable. Using a base Label as the conversion context is insufficient because it doesn't contain the repo mapping. Work towards https://github.com/bazelbuild/bazel/issues/15658. PiperOrigin-RevId: 454658146 Change-Id: I9219da9eec785d76a040e72f6901df466ae19799
{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