Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bzlmod: Verify that the lockfile is platform-independent #1617

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ tasks:
- bazel run //:gazelle -- update pkg
- bazel run //:gazelle -- pkg
build_flags:
- "--allow_yanked_versions=all"
# Verify that the committed lockfile is platform-independent.
# In case of expected changes, regenerate the lockfile with
# `bazel mod graph`, which evaluates all module extensions.
# Note: `go_sdk`s *is* platform-dependent since it registers the first
# host-compatible SDK, but the result only differs if there is also a
# matching SDK with manual goos/goarch set, which isn't the case in CI.
# TODO: Make this more realistic after
# https://github.com/bazelbuild/bazel/issues/19154.
- "--lockfile_mode=error"
test_flags:
- "--allow_yanked_versions=all"
# See above.
- "--lockfile_mode=error"
build_targets:
- "//..."
- "//:gazelle"
Expand Down
2 changes: 0 additions & 2 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ bcr_test_module:
run_test_module:
name: Run test module
platform: ${{ platform }}
build_flags:
- --experimental_isolated_extension_usages
shell_commands:
# Regenerate the BUILD file for the test module using Gazelle.
- rm pkg/BUILD.bazel
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gitattributes export-ignore
# The lockfile is not used by downstream projects and tends to be large.
tests/bcr/MODULE.bazel.lock export-ignore
1 change: 1 addition & 0 deletions tests/bcr/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
common --enable_bzlmod
common --experimental_isolated_extension_usages
common --lockfile_mode=update
2 changes: 1 addition & 1 deletion tests/bcr/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.1
6.3.2
Loading