Skip to content

Commit 8f1c83b

Browse files
authoredJul 29, 2020
Remove usage of scala_export_to_java (bazelbuild#1085)
1 parent a95c54d commit 8f1c83b

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed
 

‎test/shell/test_misc.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ test_transitive_deps() {
3232
exit 1
3333
fi
3434

35-
bazel build test_expect_failure/transitive/java_to_scala:d
36-
if [ $? -eq 0 ]; then
37-
echo "'bazel build test_expect_failure/transitive/java_to_scala:d' should have failed."
35+
expected_message="error: [strict] Using type example.A from an indirect dependency"
36+
output=$(bazel build test_expect_failure/transitive/java_to_scala:d 2>&1)
37+
if [ $? -eq 0 ] || [[ "$output" != *"$expected_message"* ]]; then
38+
echo "'bazel build test_expect_failure/transitive/java_to_scala:d' should have failed with message '$expected_message'."
3839
exit 1
3940
fi
4041

‎test_expect_failure/transitive/java_to_scala/BUILD

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
load("@rules_java//java:defs.bzl", "java_library")
2-
load("//scala:scala.bzl", "scala_export_to_java", "scala_library")
2+
load("//scala:scala.bzl", "scala_library")
33

44
scala_library(
55
name = "a",
66
srcs = ["A.scala"],
77
)
88

9-
scala_export_to_java(
10-
name = "b",
11-
exports = [":a"],
12-
runtime_deps = [],
13-
)
14-
159
java_library(
1610
name = "c",
1711
srcs = ["C.java"],
18-
deps = [":b"],
12+
deps = [":a"],
1913
)
2014

2115
java_library(

0 commit comments

Comments
 (0)
Please sign in to comment.