From 1cf115a90768d1907308c7939c7666aa8e6513da Mon Sep 17 00:00:00 2001 From: David Laban Date: Thu, 8 Jul 2021 15:45:07 +0100 Subject: [PATCH] make `bazel query` try harder to get a list of dependencies If I run `bazel build "//examples/macos/..."` in https://github.com/bazelbuild/rules_apple then it works fine, but if I run `bazel query "deps(//examples/macos/...)"` then it blows up in my face, complaining about "no such package '@com_google_protobuf//'". I've not used bazel before, so I'm not sure how common this inability to get deps is. Is this a reasonable hack, or should we instead listen to the exit code of `bazel query` and abort, or trigger some kind of fallback behaviour? --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 522790e..a857c82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,6 +72,7 @@ fn buildfile(path: PathBuf) -> bool { fn query(executable: &String, q: String) -> Result> { let query = Command::new(executable) .arg("query") + .arg("--keep_going") .arg(q) .output() .unwrap();