-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Golang git_repository and new_git_repository failure #997
Comments
Breaking it down:
Some of the symlinks setup links to the go compliler and root; ignoring those, the simplified command is:
|
So the basic problem appears to be that the external repositories are not made available under the original name, and there is no rewrite / vendoring which corrects for this. |
Digging into the :remote case more. The WORKSPACE file has this rule: git_repository( This will cause the referenced github repository to be downloaded into the bazel external folder under the name. Here, As the build progresses--see above--the package file is eventually linked into the source tree. See the files list:
But the go too cannot find it because it has a new, and very different, name.
|
So, potential problems that I see here.
|
The Go rules have no special provisions for working with remote repositories, so the support for that would have to be written. Have you seen this thread, which deals with the same topic, |
I have updated the linked repositories so that they build, highlighting the workaround. |
@kchodorow any further action needed here? |
I don't think so, @laramiel feel free to comment if you disagree. |
I disagree, unless there is already a tracking bug for working with external golang repositories. |
We are moving the go rules (and all of the other rules) into rule-specific repositories, so I've opened a new umbrella issue in rules_go about it. Feel free to add any details there. |
I have created a series of git repositories to demonstrate basic bazel usage:
https://github.com/laramiel/bazel-example-golang
https://github.com/laramiel/bazel-example-golang-remote
https://github.com/laramiel/bazel-example-golang-bare
I expect to be able to issue each of these commends and have it print out contents correctly.
However, instead I get this message:
Steps to repro:
bazel run :bare
orbazel run :remote
The text was updated successfully, but these errors were encountered: