diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 48bbe1c95..2dc2f891c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -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: @@ -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: diff --git a/.bazelversion b/.bazelversion index 011a7e37e..798e38995 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1,2 +1 @@ -5.3.1 - +6.3.0 diff --git a/docs/dependency-tracking.md b/docs/dependency-tracking.md index 6e0130c16..52b9d4653 100644 --- a/docs/dependency-tracking.md +++ b/docs/dependency-tracking.md @@ -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. diff --git a/test/diagnostics_reporter/DiagnosticsReporterTest.java b/test/diagnostics_reporter/DiagnosticsReporterTest.java index a50f0cf74..24f479689 100644 --- a/test/diagnostics_reporter/DiagnosticsReporterTest.java +++ b/test/diagnostics_reporter/DiagnosticsReporterTest.java @@ -7,6 +7,7 @@ import java.util.Map; public class DiagnosticsReporterTest { + @SuppressWarnings("DoubleBraceInitialization") private static final Map tests = new HashMap() { { diff --git a/test/shell/test_scala_library.sh b/test/shell/test_scala_library.sh index 6c4cd9946..dcf8d9821 100755 --- a/test/shell/test_scala_library.sh +++ b/test/shell/test_scala_library.sh @@ -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" diff --git a/test/shell/test_strict_dependency.sh b/test/shell/test_strict_dependency.sh index 8200faa61..da6537815 100755 --- a/test/shell/test_strict_dependency.sh +++ b/test/shell/test_strict_dependency.sh @@ -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}" @@ -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} \ @@ -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} \ diff --git a/test_expect_failure/missing_direct_deps/filtering/BUILD b/test_expect_failure/missing_direct_deps/filtering/BUILD index d914c56ac..2e99d65a2 100644 --- a/test_expect_failure/missing_direct_deps/filtering/BUILD +++ b/test_expect_failure/missing_direct_deps/filtering/BUILD @@ -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"], diff --git a/test_expect_failure/unused_dependency_checker/filtering/BUILD b/test_expect_failure/unused_dependency_checker/filtering/BUILD index f23d4956a..459af6c1c 100644 --- a/test_expect_failure/unused_dependency_checker/filtering/BUILD +++ b/test_expect_failure/unused_dependency_checker/filtering/BUILD @@ -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"],