-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrecoverable error when referencing external repository #2618
Comments
You cannot use the same name twice (this should work if you call the local repository This is bug, though, in that Bazel shouldn't throw an exception. |
I'm also encountering this issue currently... surprisingly also when using gRPC as a dependency. Might this be because of some things they do internally in their BUILD files? I'm currently upgrading from gRPC 1.0.1 to 1.1.4 and I did not have this issue up to now. The most troubling thing with this is that it looks impossible to find out what the offending twice-used name is (none of my own's project targets conflict with the gRPC ones). @kchodorow is there a, potentially hackyish, way to find that out? Also on a secondary note I don't really understand your point stating that:
Could you be more explicit as to why you discourage the use of
This looks to me like the perfect situation for me to use I do understand that you could solve that by copying the BUILD files of both A and B in to your project X, switch to a NB: This is not meant to be a "rant" but I do would like to know if I am maybe missing an important design pattern somewhere that would take all my worries away. 🙂 |
It should be a dependency of the target named in the error. E.g., above, the error message says
There is a fairly long discussion on #1952. |
Thank you very much for the quick answer @kchodorow! I was able to trace it back that way. It was an issue that I had not spotted earlier on with a third party dependency. Also thanks for the link to #1952. I do understand better now that there is a growing consensus behind the deprecation of |
Dupilcate of #3676 |
Hi there,
I've set up a local_repository in our WORKSPACE file, and would like to leverage bind to prevent having to change the BUILD files.
From the documentation, it seems I should be able to do something like the following:
bind(
name = "grpc",
actual = "@grpc//:grpc",
)
local_repository(
name = "grpc",
path = "third_party/google/grpc",
)
And the BUILD dependency should become: "//external:grpc" whereas it was previously "//third_party/google/grpc:gprc".
However, if I try to do this, I hit the following exception:
Environment info
Operating System: Ubuntu 14.04
Bazel version (output of
bazel info release
): up to git commit ID 54223b0The text was updated successfully, but these errors were encountered: