git clone https://sic-phabricator.us.oracle.com/diffusion/BD/buildmedep.git
cd buildmedep
bazel build java/com/example:level-two
Succeeds on Ubuntu. But fails on OSX with the following error:
ERROR: /Users/skjohann/workspace/ws0722-bad/badger/mac_wrk_spc/buildmedep/java/com/example/BUILD:8:1: no such package '@level3//java/com/example': https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git: cannot open git-upload-pack and referenced by '//buildmedep/java/com/example:level-two'.
The error just tells me that the dependency is missing.
My ~/.gitconfig is identical between Ubuntu and OSX. I don't even know if Bazel relies on it.
If I look at the cached files on Ubuntu (where it works just fine) the git config for the dependency is:
$ cat /home/skjohann/.cache/bazel/_bazel_skjohann/280ef1f038df3cf197c91c3edf3b59bc/external/level3/.git/config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "origin"]
url = https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
But if I look at the cached files on OSX (where it fails to build) the git config for the dependency is missing the branch:
$ cat /private/var/tmp/_bazel_skjohann/2b8678a0db94673b85f3f88e3acbacc0/external/level3/.git/config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true
[remote "origin"]
url = https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git
fetch = +refs/heads/*:refs/remotes/origin/*
The missing branch is probably an issue. The precomposeunicode flag is also set on OSX, but that seems reasonable.
I've attached a copy of my source code. "buildmedep" and "buildmedepdep" are git repositories. The WORKSPACE in "buildmedep" is:
git_repository(
name = "level3",
commit = "7b358927c4d3b344a257dbe69733dc8192672be3",
remote = "https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git",
)
And the BUILD file in "buildmedep" is:
java_library(
name = "level-two",
srcs = glob(["*.java"]),
deps = ["@level3//java/com/example:level-three"],
visibility = ["//visibility:public"],
)
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/a810a018-a7f0-4b96-bf09-b29b551a346f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
java.lang.RuntimeException: Unrecoverable error while evaluating node 'GIT_CLONE:https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git -> /private/var/tmp/_bazel_skjohann/152112983e106425cb88daf25fc01b89/external/level3 (7b358927c4d3b344a257dbe69733dc8192672be3) submodules: false' (requested by nodes 'GIT_REPOSITORY:@level3')
............
Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.TransportException: https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git: cannot open git-upload-pack
............
Caused by: org.eclipse.jgit.api.errors.TransportException: https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git: cannot open git-upload-pack
............
Caused by: org.eclipse.jgit.errors.TransportException: https://sic-phabricator.us.oracle.com/diffusion/BDD/buildmedepdep.git: cannot open git-upload-pack
............
Caused by: java.net.UnknownHostException: http://www-proxy.us.oracle.com
............
It turns out jgit is reading the proxy settings from System Preferences -> Network -> Advanced -> Proxies. Once I added the same exceptions I have in .bash_profile (where the git cli reads its settings from) - everything works as expected.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/779ea487-a162-4904-aa3f-71fcaac8bdea%40googlegroups.com.