Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Clarify Bazel lockfile verification failures (#46993)

jiff747d23d4bc8
diff --git a/justfile b/justfile
index 7a93f11957..3614939c72 100644
--- a/justfile
+++ b/justfile
@@ -151,7 +151,7 @@ bazel-lock-check:
[windows]
bazel-lock-check:
- bazel mod deps --lockfile_mode=error; if ($LASTEXITCODE -ne 0) { Write-Error "MODULE.bazel.lock is out of date. Run 'just bazel-lock-update' and commit the updated lockfile."; exit 1 }
+ bazel mod deps --lockfile_mode=error; if ($LASTEXITCODE -ne 0) { Write-Error "Unable to verify MODULE.bazel.lock; see the Bazel error above. If Bazel reports an out-of-date lockfile, run 'just bazel-lock-update' and commit the updated lockfile."; exit 1 }
bazel-test:
bazel test --test_tag_filters=-argument-comment-lint //... --keep_going
diff --git a/scripts/check-module-bazel-lock.sh b/scripts/check-module-bazel-lock.sh
index 49ddaaef2b..1f5425ab0f 100755
--- a/scripts/check-module-bazel-lock.sh
+++ b/scripts/check-module-bazel-lock.sh
@@ -3,7 +3,7 @@ set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! "${repo_root}/.github/scripts/run_bazel_with_buildbuddy.py" mod deps --lockfile_mode=error; then
- echo "MODULE.bazel.lock is out of date."
- echo "Run 'just bazel-lock-update' and commit the updated lockfile."
+ echo "Unable to verify MODULE.bazel.lock; see the Bazel error above."
+ echo "If Bazel reports an out-of-date lockfile, run 'just bazel-lock-update' and commit the updated lockfile."
exit 1
fi