mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:41:27 +01:00
Try to fix a surprising error from the new target selection. (#3207)
Also add some extra debug logging to try to help diagnose the error.
This commit is contained in:
@@ -48,6 +48,7 @@ def filter_targets(bazel: Path, targets: str) -> str:
|
||||
)
|
||||
log(f"Bazel query snippet:\n```\n{query_snippet}\n```")
|
||||
tmp.write(query)
|
||||
tmp.flush()
|
||||
try:
|
||||
p = subprocess.run(
|
||||
[str(bazel), "query", f"--query_file={tmp.name}"],
|
||||
@@ -59,6 +60,10 @@ def filter_targets(bazel: Path, targets: str) -> str:
|
||||
return p.stdout
|
||||
except subprocess.CalledProcessError as err:
|
||||
log(err.stderr)
|
||||
log("Full query file:\n```")
|
||||
with open(tmp.name) as f:
|
||||
log(f.read())
|
||||
log("```")
|
||||
raise
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user