Skip to content

Commit

Permalink
Migrate rules_scala for bazelbuild/bazel#7153
Browse files Browse the repository at this point in the history
This PR simply follows the migration instructions in
bazelbuild/bazel#7153, that is renames
`proto_source_root` to `strip_import_prefix` and prepends the attribute
value with `/`
  • Loading branch information
hlopko committed Jun 20, 2019
1 parent a1c3b58 commit e151aba
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions test/proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ scalapb_proto_library(
deps = [":test_external_dep_proto"],
)

# Test that the `proto_source_root` attribute is handled properly
# Test that the `strip_import_prefix` attribute is handled properly
proto_library(
name = "proto_source_root",
name = "strip_import_prefix",
srcs = [
"different_root.proto",
"different_root2.proto",
],
proto_source_root = package_name(),
strip_import_prefix = "/" + package_name(),
visibility = ["//visibility:public"],
)

scalapb_proto_library(
name = "test_proto_source_root",
name = "test_strip_import_prefix",
visibility = ["//visibility:public"],
deps = [":proto_source_root"],
deps = [":strip_import_prefix"],
)

proto_library(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
proto_library(
name = "dependency",
srcs = glob(["*.proto"]),
proto_source_root = package_name(),
strip_import_prefix = "/" + package_name(),
visibility = ["//visibility:public"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load(
proto_library(
name = "user",
srcs = glob(["*.proto"]),
proto_source_root = package_name(),
strip_import_prefix = "/" + package_name(),
deps = ["//test_expect_failure/proto_source_root/dependency"],
)

Expand Down
2 changes: 1 addition & 1 deletion test_rules_scala.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ $runner test_scalaopts_from_scala_toolchain
$runner test_scala_import_library_passes_labels_of_direct_deps
$runner java_toolchain_javacopts_are_used
$runner test_scala_classpath_resources_expect_warning_on_namespace_conflict
$runner bazel build //test_expect_failure/proto_source_root/... --strict_proto_deps=off
$runner bazel build //test_expect_failure/strip_import_prefix/... --strict_proto_deps=off
$runner scala_binary_jar_is_exposed_in_build_event_protocol
$runner scala_test_jar_is_exposed_in_build_event_protocol
$runner scala_junit_test_jar_is_exposed_in_build_event_protocol
Expand Down

0 comments on commit e151aba

Please sign in to comment.