commit | cda9858b6cb4160243b5ceb930f7100589426312 | [log] [tgz] |
---|---|---|
author | Googler <brandjon@google.com> | Thu Apr 18 11:51:54 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Apr 18 11:53:35 2024 -0700 |
tree | 94d874cd01cbdda64dc398bf4392291e427a6b91 | |
parent | f8277cf9feebfae390b96218979a66f75693961c [diff] |
Allow macro and target names to overlap Previously, we had symbolic macros and targets occupy the same namespace in a package, and reported an error whenever there was a conflict between a macro and a target. This failed to consider that macros frequently (and as per style guidance, *should*) define a "main target", i.e. a target whose name is the same as the string `name` arg passed to the macro's instantiation. This CL splits the macro and target namespaces. The relevant test cases are also inverted. Note that the existence of a macro named "foo" will still prevent the implicit creation of an input file target named "foo". This is because we plan on allowing macro labels to be passed as inputs to other macros for the purpose of an undeclared inputs check, and we don't want to implicitly conflate this usage with an unrelated input file (see comment in beforeBuild()). Also update relevant test cases to use text block syntax because yay for text blocks. Work toward #19922. PiperOrigin-RevId: 626104981 Change-Id: Id65afaadb59dc49d88621f9a9abfd8029f12f557
{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