diff --git a/.bazeliskrc b/.bazeliskrc deleted file mode 100644 index acd982a1731b..000000000000 --- a/.bazeliskrc +++ /dev/null @@ -1,7 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# Keep pinned to a recent release, listed at -# https://github.com/bazelbuild/bazel. -USE_BAZEL_VERSION=7.3.0 diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 000000000000..1502020768a7 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.3.0 diff --git a/MODULE.bazel b/MODULE.bazel index 444c0430ae29..c2f395a0eac7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,24 +7,12 @@ `MODULE.bazel.lock` may change locally when `bazel` is executed. This means one of: -1. `MODULE.bazel` is changing. +1. An input is changing, typically `MODULE.bazel` or `.bazelversion`. - Running `bazel mod deps` provides a canonical update to `MODULE.bazel.lock`; include the changes. - GitHub test actions may also identify platform-specific lockfile updates. -2. The `bazel` version doesn't match the version used to generate the - `MODULE.bazel.lock`. - - Bazel releases can change the lock file contents. - - We use Bazelisk in order to keep everyone using the same version: - https://bazel.build/install/bazelisk - - Developers are encouraged to alias `bazel` to `bazelisk` for - ease-of-use; some setups, like Homebrew, will include that with a - `bazelisk` install. - - Contribution tools documentation includes `bazelisk` setup: - https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/contribution_tools.md - - Make sure `bazelisk --version` (or `bazel --version`) matches the - version in `.bazeliskrc`. -3. The host platform hasn't yet been added to the lock file. +2. The host platform hasn't yet been added to the lock file. - Platforms tested with GitHub actions are kept up-to-date. Other platforms may fall out of sync due to `bazel` or dependency changes, and should be updated with a PR the same way a platform is added. diff --git a/docs/project/contribution_tools.md b/docs/project/contribution_tools.md index 3c1ee40e169b..9cf8b562f03a 100644 --- a/docs/project/contribution_tools.md +++ b/docs/project/contribution_tools.md @@ -169,7 +169,7 @@ These tools are essential for work on Carbon. - Main tools - [Bazel](https://www.bazel.build/) - [Bazelisk](https://docs.bazel.build/versions/master/install-bazelisk.html): - Downloads and runs the [configured Bazel version](/.bazeliskrc). + Downloads and runs the [configured Bazel version](/.bazelversion). - [Clang](https://clang.llvm.org/) and [LLVM](https://llvm.org/) - NOTE: Most LLVM 14+ installs should build Carbon. If you're having issues, see