Roll forward of https://github.com/bazelbuild/bazel/commit/943c83aa58731c4f9561d79c458f254427a8f24c: Command line aspect-on-aspect

Supports aspect-on-aspect for command line aspects. Command line aspects specified via `--aspects` option will support a top-level aspect requiring aspect providers via `required_aspect_providers` to get their values from other top-level aspects advertising it that come before it in the `--aspects` list.

NEW:
- Store only the list of AspectValue in TopLevelAspectsValue and not a map from AspectKey to AspectValue
- Introduce `BuildTopLevelAspectsDetailsFunction` sky function to be responsible for computing the dependency between the top-level aspects based on `required_aspect_providers` and `provides` or based on `requires` attribute. Since the dependency between the aspects will be the same for all top level targets this function will only compute it once.

Automated rollback of commit b27fd22f1bd1e29ec2475a3935c9004cc14713bf.

*** Reason for rollback ***

Roll forward, optimize the solution for top-level aspect-on-aspect by storing only a list of AspectValues in TopLevelAspectsValue and introducing `BuildTopLevelAspectsDetailsFunction` to compute the dependency between the top-level aspects only once for all top-level targets.

*** Original change description ***

Automated rollback of commit 943c83aa58731c4f9561d79c458f254427a8f24c.

*** Reason for rollback ***

This CL causes memory regression for single top-level aspect described in b/193314770

*** Original change description ***

Command line aspect-on-aspect

This CL supports aspect-on-aspect for command line aspects. Command line aspects specified via `--aspects` option will support a top-level aspect requiring aspect providers via `required_aspect_providers` to get their values from other top-level aspects advertising it...

***

PiperOrigin-RevId: 387052900
17 files changed
tree: e3b9fc072b5f6b670dc982a75accb748d4bb7221
  1. .bazelci/
  2. examples/
  3. scripts/
  4. site/
  5. src/
  6. third_party/
  7. tools/
  8. .bazelrc
  9. .gitattributes
  10. .gitignore
  11. AUTHORS
  12. BUILD
  13. CHANGELOG.md
  14. CODEBASE.md
  15. CODEOWNERS
  16. combine_distfiles.py
  17. combine_distfiles_to_tar.sh
  18. compile.sh
  19. CONTRIBUTING.md
  20. CONTRIBUTORS
  21. distdir.bzl
  22. distdir_deps.bzl
  23. ISSUE_TEMPLATE.md
  24. LICENSE
  25. README.md
  26. WORKSPACE
README.md

Bazel

{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.

Getting Started

Documentation

Contributing to Bazel

See CONTRIBUTING.md

Build status