Skip to content

Commit

Permalink
[7.0.0] Enforce lockfile update
Browse files Browse the repository at this point in the history
- Upgraded rules_python to 0.26.0 to include bazelbuild/rules_python#1433
- Updated the lockfile on all supported platforms.
- Enable `--lockfile_mode=update` for regular builds (mostly affecting local build)
- Enable `--lockfile_mode=error` for CI builds to ensure lockfile is up-to-date.

After this change, please make sure to update the lockfile by running `bazel mod deps` whenever you change the MODULE.bazel file or any .bzl file used in it.

Closes #20101.

PiperOrigin-RevId: 580553351
Change-Id: I54c3298e6c23c8392226e1e32ba203689f334226
  • Loading branch information
meteorcloudy committed Nov 9, 2023
1 parent fa0c601 commit 0e41839
Show file tree
Hide file tree
Showing 4 changed files with 445 additions and 192 deletions.
8 changes: 7 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ common:bzlmod --enable_bzlmod
common:bzlmod --check_direct_dependencies=error
common:bzlmod --experimental_downloader_config=bazel_downloader.cfg
common --config=bzlmod
common --lockfile_mode=off
common --lockfile_mode=update

# Enable Java 11 language features (https://github.com/bazelbuild/bazel/issues/14592)
build --java_language_version=11
Expand All @@ -67,7 +67,11 @@ try-import %workspace%/user.bazelrc
build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh

# Flags for CI builds
## Common
common:ci-common --lockfile_mode=error

## For Linux
common:ci-linux --config=ci-common
build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
Expand All @@ -76,6 +80,7 @@ test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
test:ci-linux --sandbox_default_allow_network=false

## For macOS
common:ci-macos --config=ci-common
build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
Expand All @@ -84,6 +89,7 @@ test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
test:ci-macos --sandbox_default_allow_network=false

## For Windows
common:ci-windows --config=ci-common
build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
test:ci-windows --test_env=BAZEL_VC
test:ci-windows --test_env=JAVA_HOME
Expand Down
3 changes: 1 addition & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

module(
name = "bazel",
version = "7.0.0-pre",
repo_name = "io_bazel",
)

Expand All @@ -27,7 +26,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_java", version = "7.1.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "5.2")
bazel_dep(name = "rules_python", version = "0.24.0")
bazel_dep(name = "rules_python", version = "0.26.0")
bazel_dep(name = "rules_testing", version = "0.0.4")
bazel_dep(name = "googletest", version = "1.12.1", repo_name = "com_google_googletest")

Expand Down
Loading

0 comments on commit 0e41839

Please sign in to comment.