Skip to content

Update minimal supported Bazel version to 6.3.0 #1506

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

Merged
merged 5 commits into from
Jul 26, 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
10 changes: 5 additions & 5 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ tasks:
platform: macos
shell_commands:
- "./test_rules_scala.sh"
test_coverage_linux_5_3_1:
test_coverage_linux_6_3_0:
name: "./test_coverage"
platform: ubuntu2004
bazel: 5.3.1
bazel: 6.3.0
shell_commands:
- "./test_coverage.sh"
test_coverage_macos_5_3_1:
test_coverage_macos_6.3.0:
name: "./test_coverage"
platform: macos
bazel: 5.3.1
bazel: 6.3.0
shell_commands:
- "./test_coverage.sh"
test_reproducibility_linux:
Expand All @@ -77,7 +77,7 @@ tasks:
examples_linux:
name: "./test_examples"
platform: ubuntu2004
bazel: 5.3.1
bazel: 6.3.0
shell_commands:
- "./test_examples.sh"
lint_linux:
Expand Down
3 changes: 1 addition & 2 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
5.3.1

6.3.0
10 changes: 5 additions & 5 deletions docs/dependency-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ Patterns prefixed with "-" will exclude targets.

Example patterns:
- `""` includes everything - default setting
- `"//"` includes all local targets
- `"//foo/"` includes everything under package `//foo`, if trailing slash is omitted, it will match
other packages, which start with "some", eg. `//foo_bar`
- `"//foo:bar"` includes target under label `//foo:bar`
- `"@//"` includes all local targets
- `"@//foo/"` includes everything under package `@//foo`, if trailing slash is omitted, it will match
other packages, which start with "some", eg. `@//foo_bar`
- `"@//foo:bar"` includes target under label `@//foo:bar`
- `@junit_junit` includes external targets, which start with `"@junit_junit"`
- `"-//foo:baz"` excludes target `//foo:baz`
- `"-@//foo:baz"` excludes target `@//foo:baz`

Exclusions take higher precedence over inclusions. Empty list will not match any targets.
1 change: 1 addition & 0 deletions test/diagnostics_reporter/DiagnosticsReporterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.Map;

public class DiagnosticsReporterTest {
@SuppressWarnings("DoubleBraceInitialization")
private static final Map<String, diagnostics_reporter.VerifyDiagnosticsOutput[]> tests =
new HashMap<String, diagnostics_reporter.VerifyDiagnosticsOutput[]>() {
{
Expand Down
2 changes: 1 addition & 1 deletion test/shell/test_scala_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test_scala_library_expect_better_failure_with_target_label_from_stamped_jar_on_m

test_scala_library_expect_better_failure_message_on_missing_transitive_dependency_labels_from_other_jvm_rules() {
transitive_target='.*transitive_dependency_without_manifest.jar'
direct_target='//test_expect_failure/missing_direct_deps/internal_deps:unstamped_direct_java_provider_dependency'
direct_target='@//test_expect_failure/missing_direct_deps/internal_deps:unstamped_direct_java_provider_dependency'
test_target='//test_expect_failure/missing_direct_deps/internal_deps:unstamped_jar_dependent_on_some_java_provider'

expected_message="Unknown label of file $transitive_target which came from $direct_target"
Expand Down
6 changes: 3 additions & 3 deletions test/shell/test_strict_dependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test_strict_deps_filter_included_target() {

test_demonstrate_INCORRECT_scala_proto_library_stamp() {
local test_target="//test_expect_failure/missing_direct_deps/scala_proto_deps:uses_transitive_scala_proto"
local incorrectly_stamped_expected_message="buildozer 'add deps //test_expect_failure/missing_direct_deps/scala_proto_deps:some_proto' ${test_target}"
local incorrectly_stamped_expected_message="buildozer 'add deps @//test_expect_failure/missing_direct_deps/scala_proto_deps:some_proto' ${test_target}"

# When stamping is fixed, expected stamp is:
# local correctly_stamped_expected_message="buildozer 'add deps //test_expect_failure/missing_direct_deps/scala_proto_deps:some_scala_proto' ${test_target}"
Expand All @@ -79,7 +79,7 @@ test_demonstrate_INCORRECT_scala_proto_library_stamp() {

test_scala_proto_library_stamp_by_convention() {
local test_target="//test_expect_failure/missing_direct_deps/scala_proto_deps:uses_transitive_scala_proto"
local expected_message="buildozer 'add deps //test_expect_failure/missing_direct_deps/scala_proto_deps:some_scala_proto' ${test_target}"
local expected_message="buildozer 'add deps @//test_expect_failure/missing_direct_deps/scala_proto_deps:some_scala_proto' ${test_target}"

test_expect_failure_or_warning_on_missing_direct_deps_with_expected_message \
"${expected_message}" ${test_target} \
Expand All @@ -89,7 +89,7 @@ test_scala_proto_library_stamp_by_convention() {

test_scala_proto_library_custom_phase_stamping() {
local test_target="//test_expect_failure/missing_direct_deps/scala_proto_deps:uses_transitive_some_proto_custom_suffix"
local expected_message="buildozer 'add deps //test_expect_failure/missing_direct_deps/scala_proto_deps:some_proto_custom_suffix' ${test_target}"
local expected_message="buildozer 'add deps @//test_expect_failure/missing_direct_deps/scala_proto_deps:some_proto_custom_suffix' ${test_target}"

test_expect_failure_or_warning_on_missing_direct_deps_with_expected_message \
"${expected_message}" ${test_target} \
Expand Down
4 changes: 2 additions & 2 deletions test_expect_failure/missing_direct_deps/filtering/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ scala_toolchain(
dependency_mode = "plus-one",
dependency_tracking_method = "ast",
dependency_tracking_strict_deps_patterns = [
"//test_expect_failure/missing_direct_deps/filtering",
"-//test_expect_failure/missing_direct_deps/filtering:a",
"@//test_expect_failure/missing_direct_deps/filtering",
"-@//test_expect_failure/missing_direct_deps/filtering:a",
],
strict_deps_mode = "error",
visibility = ["//visibility:public"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ scala_toolchain(
dependency_mode = "plus-one",
dependency_tracking_method = "ast",
dependency_tracking_unused_deps_patterns = [
"//test_expect_failure/unused_dependency_checker/filtering",
"-//test_expect_failure/unused_dependency_checker/filtering:a",
"@//test_expect_failure/unused_dependency_checker/filtering",
"-@//test_expect_failure/unused_dependency_checker/filtering:a",
],
unused_dependency_checker_mode = "error",
visibility = ["//visibility:public"],
Expand Down