[PATCH] D112883: [bazel] Re-introduce `copts` hacks for lib/AST includes.

Geoffrey Martin-Noble via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 2 14:47:15 PDT 2021


GMNGeoffrey added a comment.

In D112883#3101685 <https://reviews.llvm.org/D112883#3101685>, @GMNGeoffrey wrote:

> In D112883#3101665 <https://reviews.llvm.org/D112883#3101665>, @chandlerc wrote:
>
>> However, I thought with Bazel having a consistent repo name was important to allow cross-repo dependencies to reliably resolve, and so maybe this isn't that bad of a thing to rely on?
>
> I think cross-repo dependencies just tend to only work by chance. I haven't seen any specific guidance for how to name repository, so I don't think it can really be relied upon. Bazel has functionality in `local_repository` specifically to remap repository names (https://docs.bazel.build/versions/main/be/workspace.html#local_repository.repo_mapping), but of course it's only available in local_repository and there's no way to compose it.

I recently learned that apparently `repo_mapping` works for *all* repository rules. That's just not documented anywhere: https://github.com/bazelbuild/bazel/issues/10410. So yeah relying on repository naming is for sure a bug. Of course, so are all the other options.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112883/new/

https://reviews.llvm.org/D112883



More information about the cfe-commits mailing list