Closed zrlk closed 8 years ago
I think this is working as intended, although it is annoying that Bazel stomps all over the very common third_party directory. Assigning to @lberki to take a look. Theoretically we could make everything depend on @bazel-tools//third_party:whatever, which would solve this issue.
This is kind of odd: Kristina's diagnosis is correct and this should be fixed once we can load Skylark code from remote repositories ( @jhfield :) ), but I'm wondering why you depend on //third_party/buck-ios-support . My understanding is that it's a dependency of xcodegen, which should be precompiled into tools/objc/precomp_xcodegen_deploy.jar .
Could you tell me the command line to use for your build and the output of the following command:
bazel query -k 'somepath(<targets you build>,//third_party/java/buck-ios-support:all)'
Also paging @Aragos in case he knows this off the bat.
This is Kythe (kythe.io)
CLANG=`which clang-3.6` ./setup_bazel.sh
bazel query -k 'somepath(//...,//third_party/java/buck-ios-support:all)'
INFO: Empty results (with Bazel f87a414)
CLANG=`which clang-3.6` ./setup_bazel.sh
bazel query -k 'somepath(//...,//third_party/java/buck-ios-support:all)'
ERROR: /path/to/bazel/base_workspace/examples/py/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/py.
ERROR: /path/to/bazel/base_workspace/examples/proto/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/proto.
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/src/test/java/com/example/myproject/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/java-skylark/src/test/java/com/example/myproject.
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/src/main/java/com/example/myproject/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/java-skylark/src/main/java/com/example/myproject.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/test/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: tools/build_rules/rust/test.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/scala/test/BUILD:1: Extension file not found. Unable to load file '//tools:build_defs/scala/scala.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: tools/build_defs/scala/test.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/sass/test/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: tools/build_defs/sass/test.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:18:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:dmd'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:18:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:dmd'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:42:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:druntime-import-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:42:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:druntime-import-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:34:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:phobos-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:34:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:phobos-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:26:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:libphobos2'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:26:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:libphobos2'.
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_framework', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_exe', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_exe_libs', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:24:1: no such package '@golang-linux-amd64//': error loading package 'external': The repository named '@golang-linux-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:go_tool'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:24:1: no such package '@golang-darwin-amd64//': error loading package 'external': The repository named '@golang-darwin-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:go_tool'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:15:1: no such package '@golang-linux-amd64//': error loading package 'external': The repository named '@golang-linux-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:toolchain'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:15:1: no such package '@golang-darwin-amd64//': error loading package 'external': The repository named '@golang-darwin-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:toolchain'.
ERROR: /path/to/bazel/base_workspace/examples/go/lib/BUILD:7:1: every rule of type go_library implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/go/vendor/github_com/user/vendored/BUILD:7:1: every rule of type go_library implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/go/bin/BUILD:7:1: every rule of type go_binary implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/tools/BUILD:6:1: every rule of type go_binary implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/go/lib/BUILD:14:1: every rule of type go_test implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/j2objc/BUILD:29:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:StdRedirect.dylib', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/j2objc/BUILD:29:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:environment_plist.sh', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/BUILD:3:1: error loading package 'examples/java-skylark/src/test/java/com/example/myproject': Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file and referenced by '//examples/java-skylark:srcs'.
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/BUILD:3:1: error loading package 'examples/java-skylark/src/main/java/com/example/myproject': Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file and referenced by '//examples/java-skylark:srcs'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/jsonnet/BUILD:13:1: no such package '@jsonnet//': error loading package 'external': The repository named '@jsonnet' could not be resolved and referenced by '//tools/build_defs/jsonnet:std'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/jsonnet/BUILD:8:1: no such package '@jsonnet//': error loading package 'external': The repository named '@jsonnet' could not be resolved and referenced by '//tools/build_defs/jsonnet:jsonnet'.
ERROR: /path/to/bazel/base_workspace/examples/objc/BUILD:15:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:StdRedirect.dylib', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/objc/BUILD:15:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:environment_plist.sh', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:27:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc_lib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:27:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc_lib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:35:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustdoc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:35:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustdoc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:43:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustlib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:43:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustlib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:19:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:19:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/sass/BUILD:9:1: no such package '@sassc//': error loading package 'external': The repository named '@sassc' could not be resolved and referenced by '//tools/build_defs/sass:sassc'.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/proto': Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/py': Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:126:1: no such target '//third_party:asm': target 'asm' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/ijar/test:IjarTests'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:126:1: no such package 'src/java_tools/buildjar': BUILD file not found on package path and referenced by '//third_party/ijar/test:IjarTests'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:111:1: no such target '//third_party:asm': target 'asm' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/ijar/test:gen_source_debug_extension'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:7:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//third_party/ijar/test:ijar_test'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:47:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//third_party/ijar/test:zip_test'.
ERROR: /path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD:11:1: no such target '//third_party:guava': target 'guava' not declared in package 'third_party'; however, a source directory of this name exists. (Perhaps add 'exports_files(["guava"])' to third_party/BUILD, or define a filegroup?) defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/java/buck-ios-support:buck-ios-support'.
ERROR: /path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD:11:1: no such target '//third_party:jsr305': target 'jsr305' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/java/buck-ios-support:buck-ios-support'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:39:1: no such package 'src/tools/android/java/com/google/devtools/build/android/idlclass': BUILD file not found on package path and referenced by '//tools/android:IdlClass'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:15:1: no such package 'src/tools/android/java/com/google/devtools/build/android': BUILD file not found on package path and referenced by '//tools/android:aar_generator'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:10:1: no such package 'src/tools/android/java/com/google/devtools/build/android/incrementaldeployment': BUILD file not found on package path and referenced by '//tools/android:incremental_split_stub_application'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:5:1: no such package 'src/tools/android/java/com/google/devtools/build/android/incrementaldeployment': BUILD file not found on package path and referenced by '//tools/android:incremental_stub_application'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:27:1: no such package 'src/tools/android/java/com/google/devtools/build/android/ziputils': BUILD file not found on package path and referenced by '//tools/android:merge_dexzips'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:21:1: no such package 'src/tools/android/java/com/google/devtools/build/android': BUILD file not found on package path and referenced by '//tools/android:resources_processor'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:33:1: no such package 'src/tools/android/java/com/google/devtools/build/android/ziputils': BUILD file not found on package path and referenced by '//tools/android:shuffle_jars'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/docker/BUILD:43:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//tools/build_defs/docker:build_test'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/pkg/BUILD:138:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//tools/build_defs/pkg:build_test'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/appengine/BUILD:2:1: no such package '@javax-servlet-api//jar': error loading package 'external': The repository named '@javax-servlet-api' could not be resolved and referenced by '//tools/build_rules/appengine:javax.servlet.api'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/closure/BUILD:15:1: no such package '@closure_stylesheets//jar': error loading package 'external': The repository named '@closure_stylesheets' could not be resolved and referenced by '//tools/build_rules/closure:closure_stylesheets'.
WARNING: errors encountered while analyzing target '//tools/android:IdlClass': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/go/toolchain:toolchain': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_lib:greeter_docs': it will not be built.
WARNING: errors encountered while analyzing target '//examples/go/vendor/github_com/user/vendored:go_default_library': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_world:hello_world_docs': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/closure:closure_stylesheets': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:gen_source_debug_extension': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_lib:greeter': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_lib:hello_lib_doc_test': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/java/buck-ios-support:buck-ios-support': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/fibonacci:fibonacci_doc_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:invalid_test': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/docker:build_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:wordcount': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:shell-workflows-lib': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/rust:rustc_lib': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:workflow': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/sass:sassc': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:intersection_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_lib:greeting_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/dotnet/example_test:MyTest': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:all_tests': it will not be built.
WARNING: errors encountered while analyzing target '//examples/objc:PrenotCalculator': it will not be built.
WARNING: errors encountered while analyzing target '//examples:srcs': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:IjarTests': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:zip_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:intersection': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:incremental_split_stub_application': it will not be built.
WARNING: errors encountered while analyzing target '//examples/j2objc:J2ObjcExample': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_lib:hello_lib_doc': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/rust:rustdoc': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/d:druntime-import-src': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:gen_source_debug_extension_jar': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/go/tools:generate_test_main': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_lib:hello_lib': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/rust:rustc': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/pkg:build_test': it will not be built.
WARNING: errors encountered while analyzing target '//third_party/ijar/test:ijar_test': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/d:libphobos2': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:incremental_stub_application': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:merge_dexzips': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_lib:native_greeter_docs': it will not be built.
WARNING: errors encountered while analyzing target '//examples/java-skylark:srcs': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/jsonnet:std': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:wordcount_test': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/d:dmd': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/fibonacci:fibonacci_bench': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_world:hello_world': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:resources_processor': it will not be built.
WARNING: errors encountered while analyzing target '//examples/go/bin:bin': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/jsonnet:jsonnet': it will not be built.
WARNING: errors encountered while analyzing target '//examples/go/lib:go_default_library': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/go/toolchain:go_tool': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_world:hello_world_doc_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/fibonacci:fibonacci_test': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_defs/d:phobos-src': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_world:hello_world_doc': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:shuffle_jars': it will not be built.
WARNING: errors encountered while analyzing target '//examples/go/lib:lib_test': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/rust:rustlib': it will not be built.
WARNING: errors encountered while analyzing target '//tools/build_rules/appengine:javax.servlet.api': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/fibonacci:fibonacci': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_lib:hello_lib_test': it will not be built.
WARNING: errors encountered while analyzing target '//examples/jsonnet:shell-workflows': it will not be built.
WARNING: errors encountered while analyzing target '//tools/android:aar_generator': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/hello_world:hello_world': it will not be built.
WARNING: errors encountered while analyzing target '//examples/sass/hello_world:hello_world': it will not be built.
WARNING: errors encountered while analyzing target '//examples/rust/fibonacci:fibonacci_doc': it will not be built.
WARNING: errors encountered while analyzing target '//examples/d/hello_lib:greeter_test': it will not be built.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:34:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:phobos-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:42:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:druntime-import-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:26:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:libphobos2'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:42:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:druntime-import-src'.
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_exe', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_framework', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/dotnet/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_exe_libs', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:18:1: no such package '@dmd-darwin-x86_64//': error loading package 'external': The repository named '@dmd-darwin-x86_64' could not be resolved and referenced by '//tools/build_defs/d:dmd'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:18:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:dmd'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:34:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:phobos-src'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/d/BUILD:26:1: no such package '@dmd-linux-x86_64//': error loading package 'external': The repository named '@dmd-linux-x86_64' could not be resolved and referenced by '//tools/build_defs/d:libphobos2'.
ERROR: /path/to/bazel/base_workspace/examples/go/vendor/github_com/user/vendored/BUILD:7:1: every rule of type go_library implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:15:1: no such package '@golang-linux-amd64//': error loading package 'external': The repository named '@golang-linux-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:toolchain'.
ERROR: /path/to/bazel/base_workspace/examples/go/lib/BUILD:7:1: every rule of type go_library implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:15:1: no such package '@golang-darwin-amd64//': error loading package 'external': The repository named '@golang-darwin-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:toolchain'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:24:1: no such package '@golang-darwin-amd64//': error loading package 'external': The repository named '@golang-darwin-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:go_tool'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/toolchain/BUILD:24:1: no such package '@golang-linux-amd64//': error loading package 'external': The repository named '@golang-linux-amd64' could not be resolved and referenced by '//tools/build_rules/go/toolchain:go_tool'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/go/tools/BUILD:6:1: every rule of type go_binary implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/go/lib/BUILD:14:1: every rule of type go_test implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/go/bin/BUILD:7:1: every rule of type go_binary implicitly depends upon the target '//external:go_prefix', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/j2objc/BUILD:29:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:environment_plist.sh', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/j2objc/BUILD:29:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:StdRedirect.dylib', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/BUILD:3:1: error loading package 'examples/java-skylark/src/test/java/com/example/myproject': Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file and referenced by '//examples/java-skylark:srcs'.
ERROR: /path/to/bazel/base_workspace/examples/java-skylark/BUILD:3:1: error loading package 'examples/java-skylark/src/main/java/com/example/myproject': Extension file not found. Unable to load file '//tools:build_rules/java_rules_skylark.bzl': file doesn't exist or isn't a file and referenced by '//examples/java-skylark:srcs'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/jsonnet/BUILD:13:1: no such package '@jsonnet//': error loading package 'external': The repository named '@jsonnet' could not be resolved and referenced by '//tools/build_defs/jsonnet:std'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/jsonnet/BUILD:8:1: no such package '@jsonnet//': error loading package 'external': The repository named '@jsonnet' could not be resolved and referenced by '//tools/build_defs/jsonnet:jsonnet'.
ERROR: /path/to/bazel/base_workspace/examples/objc/BUILD:15:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:StdRedirect.dylib', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/examples/objc/BUILD:15:1: every rule of type objc_binary implicitly depends upon the target '@bazel_tools//tools/objc:environment_plist.sh', but this target could not be found. If this is an integration test, maybe you forgot to add a mock for your new tool?
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:43:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustlib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:19:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:27:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc_lib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:19:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:35:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustdoc'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:27:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustc_lib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:43:1: no such package '@rust-darwin-x86_64//': error loading package 'external': The repository named '@rust-darwin-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustlib'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/rust/BUILD:35:1: no such package '@rust-linux-x86_64//': error loading package 'external': The repository named '@rust-linux-x86_64' could not be resolved and referenced by '//tools/build_rules/rust:rustdoc'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/sass/BUILD:9:1: no such package '@sassc//': error loading package 'external': The repository named '@sassc' could not be resolved and referenced by '//tools/build_defs/sass:sassc'.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/proto': Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/py': Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:126:1: no such target '//third_party:asm': target 'asm' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/ijar/test:IjarTests'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:126:1: no such package 'src/java_tools/buildjar': BUILD file not found on package path and referenced by '//third_party/ijar/test:IjarTests'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:7:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//third_party/ijar/test:ijar_test'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:111:1: no such target '//third_party:asm': target 'asm' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/ijar/test:gen_source_debug_extension'.
ERROR: /path/to/bazel/base_workspace/third_party/ijar/test/BUILD:47:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//third_party/ijar/test:zip_test'.
ERROR: /path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD:11:1: no such target '//third_party:guava': target 'guava' not declared in package 'third_party'; however, a source directory of this name exists. (Perhaps add 'exports_files(["guava"])' to third_party/BUILD, or define a filegroup?) defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/java/buck-ios-support:buck-ios-support'.
ERROR: /path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD:11:1: no such target '//third_party:jsr305': target 'jsr305' not declared in package 'third_party' defined by /path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/java/buck-ios-support:buck-ios-support'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:39:1: no such package 'src/tools/android/java/com/google/devtools/build/android/idlclass': BUILD file not found on package path and referenced by '//tools/android:IdlClass'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:15:1: no such package 'src/tools/android/java/com/google/devtools/build/android': BUILD file not found on package path and referenced by '//tools/android:aar_generator'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:5:1: no such package 'src/tools/android/java/com/google/devtools/build/android/incrementaldeployment': BUILD file not found on package path and referenced by '//tools/android:incremental_stub_application'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:10:1: no such package 'src/tools/android/java/com/google/devtools/build/android/incrementaldeployment': BUILD file not found on package path and referenced by '//tools/android:incremental_split_stub_application'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:27:1: no such package 'src/tools/android/java/com/google/devtools/build/android/ziputils': BUILD file not found on package path and referenced by '//tools/android:merge_dexzips'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:21:1: no such package 'src/tools/android/java/com/google/devtools/build/android': BUILD file not found on package path and referenced by '//tools/android:resources_processor'.
ERROR: /path/to/bazel/base_workspace/tools/android/BUILD:33:1: no such package 'src/tools/android/java/com/google/devtools/build/android/ziputils': BUILD file not found on package path and referenced by '//tools/android:shuffle_jars'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/docker/BUILD:43:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//tools/build_defs/docker:build_test'.
ERROR: /path/to/bazel/base_workspace/tools/build_defs/pkg/BUILD:138:1: no such package 'src/test/shell': BUILD file not found on package path and referenced by '//tools/build_defs/pkg:build_test'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/appengine/BUILD:2:1: no such package '@javax-servlet-api//jar': error loading package 'external': The repository named '@javax-servlet-api' could not be resolved and referenced by '//tools/build_rules/appengine:javax.servlet.api'.
ERROR: /path/to/bazel/base_workspace/tools/build_rules/closure/BUILD:15:1: no such package '@closure_stylesheets//jar': error loading package 'external': The repository named '@closure_stylesheets' could not be resolved and referenced by '//tools/build_rules/closure:closure_stylesheets'.
ERROR: Evaluation of query "somepath(//..., //third_party/java/buck-ios-support:all)" failed: errors were encountered while computing transitive closure.
WARNING: --keep_going specified, ignoring errors. Results may be inaccurate.
//third_party/java/buck-ios-support:buck-ios-support (with Bazel 9e091ddef4dbbd97a2)
Does the original issue mentioned above come up when doing bazel build //...
?
This output is unexpectedly unhelpful because, well, :buck-ios-support
is on the command line and thus the somepath returns the trivial result. Can you try allpaths(...,...) --output=graph
?
Alternatively, I can just take a look myself if you tell me how to reproduce this. Is invoking setup_bazel.sh
enough?
The issue shows up in Bazel 9e091ddef4dbbd97a2bff75948c474fe4127e541:
From a freshly-cleaned checkout of the Kythe code:
CLANG=`which clang-3.6` ./setup_bazel.sh
bazel build //...
fails, now in a different way:
ERROR: /path/to/bazel/base_workspace/examples/proto/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/proto.
ERROR: error loading package 'examples/proto': Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file.
If I run the build again I get a different error; I've also seen
ERROR: /path/to/bazel/base_workspace/tools/build_defs/sass/test/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: tools/build_defs/sass/test.
ERROR: error loading package 'tools/build_defs/sass/test': Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file.
and
ERROR: /path/to/bazel/base_workspace/examples/py/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file.
ERROR: package contains errors: examples/py.
ERROR: error loading package 'examples/py': Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file.
The result of bazel query -k 'allpaths(...,...)' --output=graph is a bunch of Graphviz. These are the lines containing buck
:
"//third_party/java/buck-ios-support:buck-ios-support"
"//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:java_langtools\n//tools/defaults:java_toolchain\n//tools/defaults:javabuilder\n//tools/defaults:javac_bootclasspath\n//tools/defaults:javac_extdir\n//tools/defaults:singlejar\n//tools/defaults:genclass"
"//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:jdk"
"//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:ijar"
"//third_party/java/buck-ios-support:buck-ios-support" -> "//third_party/java/dd_plist:dd_plist"
This is the full graph: graph.txt
This is due to the lame base_workspace thing we have. Should be fixed really soon properly, but for the time being, let me just send out a change that makes this a little more bearable for the meantime that will make Bazel do not traverse into //tools, //examples and //third_party when resolving //... .
On Mon, Dec 7, 2015 at 11:52 PM, zrlk notifications@github.com wrote:
The issue shows up in Bazel 9e091dd https://github.com/bazelbuild/bazel/commit/9e091ddef4dbbd97a2bff75948c474fe4127e541 :
From a freshly-cleaned checkout of the Kythe code:
CLANG=
which clang-3.6
./setup_bazel.sh bazel build //...fails, now in a different way:
ERROR: /path/to/bazel/base_workspace/examples/proto/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file. ERROR: package contains errors: examples/proto. ERROR: error loading package 'examples/proto': Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file.
If I run the build again I get a different error; I've also seen
ERROR: /path/to/bazel/base_workspace/tools/build_defs/sass/test/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file. ERROR: package contains errors: tools/build_defs/sass/test. ERROR: error loading package 'tools/build_defs/sass/test': Extension file not found. Unable to load file '//tools:build_rules/test_rules.bzl': file doesn't exist or isn't a file.
and
ERROR: /path/to/bazel/base_workspace/examples/py/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file. ERROR: package contains errors: examples/py. ERROR: error loading package 'examples/py': Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file.
The result of bazel query -k 'allpaths(...,...)' --output=graph is a bunch of Graphviz. These are the lines containing buck:
"//third_party/java/buck-ios-support:buck-ios-support" "//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:java_langtools\n//tools/defaults:java_toolchain\n//tools/defaults:javabuilder\n//tools/defaults:javac_bootclasspath\n//tools/defaults:javac_extdir\n//tools/defaults:singlejar\n//tools/defaults:genclass" "//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:jdk" "//third_party/java/buck-ios-support:buck-ios-support" -> "//tools/defaults:ijar" "//third_party/java/buck-ios-support:buck-ios-support" -> "//third_party/java/dd_plist:dd_plist"
This is the full graph: graph.txt https://github.com/bazelbuild/bazel/files/54706/graph.txt
— Reply to this email directly or view it on GitHub https://github.com/bazelbuild/bazel/issues/652#issuecomment-162696027.
Lukács T. Berki | Software Engineer | lberki@google.com |
Google Germany GmbH | Maximillianstr. 11-15 | 80539 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891
I checked this in an appropriately mutilated Kythe tree with bazel build --nobuild -k //...
. It seems to work alright.
This works for me, but only with -k
.
What's the error message? I had remove your tools/ directory and then add back a few parts which you apparently needed, but otherwise, it worked alright for me.
On Tue, Dec 8, 2015 at 6:27 PM, zrlk notifications@github.com wrote:
This works for me, but only with -k.
— Reply to this email directly or view it on GitHub https://github.com/bazelbuild/bazel/issues/652#issuecomment-162953046.
Lukács T. Berki | Software Engineer | lberki@google.com |
Google Germany GmbH | Maximillianstr. 11-15 | 80539 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891
bazel build //...
.........
ERROR: /path/to/bazel/base_workspace/examples/proto/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/proto': Extension file not found. Unable to load file '//tools:build_rules/genproto.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: Loading failed; build aborted.
or
bazel build //...
ERROR: /path/to/bazel/base_workspace/examples/py/BUILD:1: Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file.
ERROR: /path/to/bazel/base_workspace/examples/BUILD:3:1: error loading package 'examples/py': Extension file not found. Unable to load file '//tools:build_rules/py_rules.bzl': file doesn't exist or isn't a file and referenced by '//examples:srcs'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.549s
and for a sanity check:
bazel version
Build label: head (@30df02a)
Build target: bazel-out/local_linux-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Dec 8 17:20:32 2015 (1449595232)
Build timestamp: 1449595232
Build timestamp as int: 1449595232
Erm. I almost got it right :) Let me send out a change that'll fix for realsies... in the meantime, could you try running rm base_workspace/{tools,examples}/BUILD
and building again? Then it should work.
As of commit 53f407608ef6547bd690fa4420418aa6b6991b22 I'm able to build and test //...
(without removing any files in base_workspace). Thanks!
We have a third_party directory in our workspace root. When I try to build our project with top-of-tree Bazel, I see:
/absolute/path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD:11:1: no such target '//third_party:jsr305': target 'jsr305' not declared in package 'third_party'; however, a source directory of this name exists. (Perhaps add 'exports_files(["jsr305"])' to third_party/BUILD, or define a filegroup?) defined by /absolute/path/to/kythe-trunk/third_party/BUILD and referenced by '//third_party/java/buck-ios-support:buck-ios-support'.
If I add
java_import( name = "jsr305", jars = [ "jsr305" ], )
to my //third_party/BUILD and a corresponding //third_party/jsr305/BUILD (with a filegroup named :jsr305), the error goes away.
I believe that /absolute/path/to/bazel/base_workspace/third_party/java/buck-ios-support/BUILD (in the separate @bazel_tools repository) should find Bazel's //third_party:jsr305, not the jsr305 defined by my project. At the very least Bazel should search for //third_party:jsr305 in @bazel_tools if it can't find one in my project. That would help with another, similar error that I get if I try to repair my build in this fashion:
/absolute/path/to/bazel/base_workspace/third_party/ijar/test/BUILD:126:1: no such package 'src/java_tools/buildjar': BUILD file not found on package path and referenced by '//third_party/ijar/test:IjarTests'.
I believe that Bazel is looking for its source code in my project's workspace.