{"action":"opened","issue":{"url":"https://api.github.com/repos/google/bazel/issues/360","labels_url":"https://api.github.com/repos/google/bazel/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/google/bazel/issues/360/comments","events_url":"https://api.github.com/repos/google/bazel/issues/360/events","html_url":"https://github.com/google/bazel/issues/360","id":99305991,"number":360,"title":"//external (incorrectly) refers to the repository-local path when pulling in transitive git_repository dependencies.","user":{"login":"svendjo","id":6351934,"avatar_url":"https://avatars.githubusercontent.com/u/6351934?v=3","gravatar_id":"","url":"https://api.github.com/users/svendjo","html_url":"https://github.com/svendjo","followers_url":"https://api.github.com/users/svendjo/followers","following_url":"https://api.github.com/users/svendjo/following{/other_user}","gists_url":"https://api.github.com/users/svendjo/gists{/gist_id}","starred_url":"https://api.github.com/users/svendjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svendjo/subscriptions","organizations_url":"https://api.github.com/users/svendjo/orgs","repos_url":"https://api.github.com/users/svendjo/repos","events_url":"https://api.github.com/users/svendjo/events{/privacy}","received_events_url":"https://api.github.com/users/svendjo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-05T21:48:21Z","updated_at":"2015-08-05T21:48:21Z","closed_at":null,"body":"https://groups.google.com/forum/#!topic/bazel-discuss/Zbp62_7uMfA\r\n\r\nSee the discussion over here for full details.\r\n\r\nIn summary when A => B => C (i.e. C is a transitive dependency of A.)\r\nBoth B and C are defined as git_repositories, and must be pulled at build time.\r\nThen when the B's BUILD file specifies a dependency on C:\r\njava_library(\r\n    name = \"B\",\r\n    srcs = glob([\"*.java\"]),\r\n    deps = [\"//java/com/example:C-target\"],\r\n    visibility = [\"//visibility:public\"],\r\n)\r\nThe build system currently assumes the dependency is under the repository-local path (B's path.)\r\n\r\nA preferable behavior would be to assume the dependency is under the \"main\" repository."}}