Skip to content

Commit fa24255

Browse files
committed
Improve releasing to the BCR
- It is recommended to not use compatibility_level until there is a concrete reason - Dependencies in MODULE.bazel should be the minimum requirements, not the latest available versions. Thus, do not keep in sync with the WORKSPACE approach. In WORKSPACE, dependencies can overwrite each other and thus providing more flexibility (and problems). - We configure a proper presubmit check
1 parent dd3aca9 commit fa24255

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

.bcr/presubmit.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# We configure this at it seems to be mandatory, but instead of performing of executing integration tests as intended,
2-
# we execute the unit tests. We trust our integration tests in our CI to ensure everything is fine for a release.
3-
# Either way, our integration tests are basd on Python scripts and currently could not be executed by a bazel test
4-
# command either way.
51
bcr_test_module:
6-
module_path: "e2e/bzlmod"
2+
module_path: "examples"
73
matrix:
84
platform: [ "macos", "ubuntu2004", "windows" ]
9-
bazel: [ 5.4.0, 6.x, 7.x ]
5+
# DWYU supports Bazel 5.4.0, but only via WORKSPACE
6+
bazel: [ 6.x, 7.x ]
107
tasks:
11-
run_tests:
12-
name: "Run unit tests"
8+
verify_examples:
9+
name: "Verify examples"
1310
platform: ${{ platform }}
1411
bazel: ${{ bazel }}
15-
test_targets:
16-
- "//src/..."
12+
shell_commands:
13+
- python test.py

MODULE.bazel

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@ module(
22
name = "depend_on_what_you_use",
33
# Keep in sync with setup_step_2.bzl
44
bazel_compatibility = [">=5.4.0"],
5-
compatibility_level = 0,
65
)
76

87
bazel_dep(
98
name = "bazel_skylib",
10-
# Keep in sync with //third_party/dependencies.bzl
119
version = "1.5.0",
1210
)
1311
bazel_dep(
1412
name = "rules_cc",
15-
# Keep in sync with //third_party/dependencies.bzl
1613
version = "0.0.9",
1714
)
1815
bazel_dep(
1916
name = "rules_python",
20-
# Keep in sync with //third_party/dependencies.bzl
2117
# Keep in sync with //examples/MODULE.bazel
2218
# Keep in sync with //test/aspect/MODULE.bazel
2319
# Keep in sync with //test/apply_fixes/execution_logic.py

0 commit comments

Comments
 (0)