| commit | 136dae1fdc8ef529693090cd00c2d46daeca23d7 | [log] [tgz] |
|---|---|---|
| author | Yun Peng <pcloudy@google.com> | Fri Sep 08 12:39:10 2023 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Fri Sep 08 12:40:52 2023 -0700 |
| tree | db39b962fbd676cbd4efc5cefd1752295bc61722 | |
| parent | 3f728e4bd1bba67e4871b998a05c1d3d9597c719 [diff] |
Enable Bzlmod for Bazel This PR enables Bzlmod as the default external dependencies system for Bazel. Changes included: - Enable bzlmod by default in `.bazelrc`. - Renamed `io_bazel` to `_main` at necessary locations. - Added lockfile `MODULE.bazel.lock`. We should enable `--lockfile_mode=error` on CI and `--lockfile_mode=update` for local builds after fixing some issues in the lock file feature, probably with 6.4.0. - Replaced distdir with repository cache (http artifact cache) in the offline bootstrap build. This will eventually be replaced by vendoring and packaging dependencies. - Replaced `--override_repository` hack with repository cache (http artifact cache) for running integration tests without network access. This will eventually be replaced by a true shared repository cache. - Only keep `--experimental_repository_cache_hardlinks` for macOS inside integration tests. On Linux, it'll trigger `invalid cross-device link` error because the file system of the sandbox dir is different from the repo cache dir inside docker container. - Moved common CI flags to .bazelrc for better maintenance. - Added all Maven coords in MODULE.bazel, patched rules_jvm_external to fix some Bzlmod issues. Next step: - Remove WORKSPACE and clean up distdir_deps, distdir.bzl. - Enable `--lockfile_mode=error` on CI and `--lockfile_mode=update` for local builds Closes https://github.com/bazelbuild/bazel/pull/19087 Fixes https://github.com/bazelbuild/bazel/issues/18957 PiperOrigin-RevId: 563825184 Change-Id: Ibf06418688bd568b38fd4aa73ad8328acfbaa13c
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md