Open aiuto opened 1 year ago
@Wyverald's REPO.bazel proposal may solve this.
Android (AOSP) has a virtual monorepo structure like this:
% tree
.
├── external
│ ├── a
│ │ ├── BUILD
│ │ ├── LICENSE
│ │ ├── METADATA
│ │ └── sub
│ │ └── BUILD
│ └── b
│ ├── BUILD
│ ├── LICENSE
│ └── METADATA
└── foo
└── BUILD
where //external/a
and //external/b
are git projects. They're also not necessarily repos like @a
and @b
, but //external/a
and //external/b
packages.
I think this shouldn't to be a bazel test
. It could be like a buildifier-type standalone linter/static analyzer that fails loudly if some BUILD file doesn't have default_package_metadata
set.
Typically, every BUILD file in a bazel module is under the license defined at
//:license
. Since Bazel does not have inheritance from enclosing packages, we must usually add:to every BUILD file. We should provide tools to help user maintain that invariant.
Initial thoughts:
bazel test
.@jin