[PATCH] D136496: [bazel] Make labels to third-party dependencies explicit

Aaron Siddhartha Mondal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 23:16:46 PDT 2022


aaronmondal added a comment.

In D136496#3892902 <https://reviews.llvm.org/D136496#3892902>, @GMNGeoffrey wrote:

> I'm not familiar with how bzlmod or the central registry are going to work, but just looking at the content of this patch, I think there is a problem. I think this adds a dependency on exactly the name "llvm-raw" being used when this is imported by external projects. As currently written, it's a relative reference, which has no dependence on this name. I took some care when setting all of this up to not make user-defined strings like that load-bearing, so I think this is undesirable. `llvm-raw` is kind of an implementation detail name that no one should care about too much though and is unlikely to be referenced by any other dependency, so it isn't too bad to bake it in. It was more important for the name of the final `llvm-project` Bazel repository where there were already multiple names being used in the wild. The fact that dependency names are user-defined and not necessarily consistent between projects has always been a failing in the Bazel dependency management system though, and it looks like perhaps bzlmod and this registry are attempting to establish canonical names for projects, more aligned with how package managers like `pip` work. If that's the world we're headed for, then it seems like baking this in may be the right thing to do, but I'm unsure.

Thinking about this, I also think that it would be nice if `llvm-raw` would not be a more-or-less hard required name for the intermediary repository. I'll try again whether I can get this to work with some more "relative" approach. I couldn't get Workspace-relative labels to work, but I file-relative labels (relative to the `.bzl` files themselves) may work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136496



More information about the llvm-commits mailing list